March 12, 200917 yr hi everyone i have problem with html entities, this code should work but not, can anyone tell me why? <?php $str = "A 'quote' is <b>bold</b>"; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str). '<br>'; // Outputs: A 'quote' is <b>bold</b> echo htmlentities($str, ENT_QUOTES); ?> When i try this code echo looks like A 'quote' is <b>bold</b> and not like A 'quote' is <b>bold</b>
Create an account or sign in to comment