PHP string cannot contain HTML tag
Posted: Wed Apr 09, 2008 1:29 am
Hi all
I am trying to append an HTML tag to a PHP string, and nothing happens. Example follows:
<?PHP
$pitems = "begin";
$pitems .= "<next>";
printf("output=%s",$pitems);
?>
The output is:
output=begin
It works all right with "<next~", which then disappears if I str_replace "~" with "> ". I am wondering whether this is a PHP bug, or some kind of configuration option that I don't know about, or just me being thick. I am using PHP version 4.4.7
I have searched the net till I'm sick of it. Can anyone throw any light on this?
David
I am trying to append an HTML tag to a PHP string, and nothing happens. Example follows:
<?PHP
$pitems = "begin";
$pitems .= "<next>";
printf("output=%s",$pitems);
?>
The output is:
output=begin
It works all right with "<next~", which then disappears if I str_replace "~" with "> ". I am wondering whether this is a PHP bug, or some kind of configuration option that I don't know about, or just me being thick. I am using PHP version 4.4.7
I have searched the net till I'm sick of it. Can anyone throw any light on this?
David