on 5/16/01 9:12 PM, Augusto Cesar Castoldi at [EMAIL PROTECTED] wrote:
> I'm tring to print the variable "tmp", but the echo is just printing "abcd",
> the rest he can't print.
>
> Why?
>
> regards,
>
> Augusto
>
> $tmp="abcd<efg";
> echo $tmp."<br>";
> echo "<br>";
> $tmp=addslashes($tmp);
> echo $tmp."<br>";
> echo "<br>";
> $tmp=stripslashes($tmp);
> echo $tmp."<br>";
>
Try htmlspecialchars() instead of addslashes();
$tmp="abcd<efg";
echo htmlspecialchars($tmp);
--
/chris/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]