> I have a small problem a string I have for example : $myvar= "hell<o
> friend";
> When I display the content of $myvar with echo I see "hell" and not
> rest.
> I suppose the problem come from the < how solve the problem ?

You're putting that string in HTML and it's being evaluated by the
browser. It sees the < as the beginning of a tag, so it's looking for a
tag to follow. Tags that the browser doesn't recognize are just not
shown. Try to put <foo> in your HTML and it won't show up (may depend on

What you want to do is use an HTML entity for the <, > and other
characters. < would be &lt;, > is &gt;. You can also use the
htmlentities() or htmlspecialchars() function in PHP to do the
conversion for you automatically.

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to