Good day!

I want to know if how can I add the code for htmlentities in my code.

$tpl->set_block('handle', 'block_list', 'tag_list');
foreach($rows as $row) {
	$tpl->set_var(array('emp_id'=> $row['Emp_ID'],
						'lastname' => $row['Last_Name'],
						'firstname' => $row['First_Name'],
						'birthday' => date('d-m-Y', strtotime($row['Birthday'])),
						'sorting' => $sort,
						'id' => $row['Emp_ID']
	));

$tpl->parse('tag_list', 'block_list', true);
}

$tpl->parse('handle', array('handle'));
$tpl->p('handle');

Thank you

    Just put it around any of the $row variables

    ie..

    htmlentities($row['Emp_ID']),

      watdaflip;10979983 wrote:

      Just put it around any of the $row variables

      ie..

      htmlentities($row['Emp_ID']),

      is it ok this code?

      htmlentities($row['Last_Name'], ENT_QUOTES)
      

      Thank you

        Write a Reply...