Welcome Guest, Not a member yet? Register   Sign In
Parse HTML content in CodeIgniter 4
#5

It would make more sense to put the h1 tags in the template, not in the data array, and I think you wouldn't have this problem.

PHP Code:
$template 'Hello, <h1>{firstname}</h1> {lastname}';
$data = [
    'title' => 'Mr',
    'firstname' => 'John',
    'lastname' => 'Doe'
]; 
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
Parse HTML content in CodeIgniter 4 - by ciddict - 03-20-2021, 11:50 PM
RE: Parse HTML content in CodeIgniter 4 - by includebeer - 03-28-2021, 01:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB