codeexploiter
03-06-2007, 05:30 AM
I've tried to execute the below mentioned PHP code (which is directly from PHP manual)
<?php
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str);
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str, ENT_QUOTES);
?>
But it didn't work as it supposed I mean I got the output like the following not like what they claim in the manual.
A 'quote' is <b>bold</b>A 'quote' is <b>bold</b>
I am using PHP version 5.2.0
I wonder why it is not working as it supposed.
Can any please test and let me know about it?
Thanks in advance
regards
<?php
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str);
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str, ENT_QUOTES);
?>
But it didn't work as it supposed I mean I got the output like the following not like what they claim in the manual.
A 'quote' is <b>bold</b>A 'quote' is <b>bold</b>
I am using PHP version 5.2.0
I wonder why it is not working as it supposed.
Can any please test and let me know about it?
Thanks in advance
regards