Proper HTML attribute values are surrounded by double quotes. Otherwise in sloppy mode, the HTML parser sees the pace between Hello and 1 and things a new attribute by the name of 1 has been encountered.
Cheers, Rob. On Thu, 2003-09-11 at 13:05, Golawala, Moiz M (IndSys, GE Interlogix) wrote: > I am having a problem with rendering PHP variables in an HTML text box. If the value > of $myString is "Hello" the line below will render it correctly > echo "<td><input type=text name=value".$j.$i." size=20 value=".$myString."></td>"; > > However if the value of $myString is "Hello 1" then the line above will populate the > text box with only "Hello" and it will loose the "1" > > If I change the problem line to the following: > > echo "<td>".$myString."</td>"; > > I don't have a problem. "Hello 1" will be rendered correctly. But then I don't have > a text box to edit the value. Please help. > > Thanks > Moiz > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- .---------------------------------------------. | Worlds of Carnage - http://www.wocmud.org | :---------------------------------------------: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul. | `---------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php