tco wrote:
I'm searching a reverse function for htmlentities.... i couldn't find
anything in the manual and over forums :-/
does anyone have an idea ?
Very well hidden after the charsets table, you can find
<quote src="http://www.php.net/htmlentities">
If you're wanting to decode instead (the reverse) you can use
html_entity_decode().
</quote>
and you can find more about html_entity_decode @
http://www.php.net/html_entity_decode
#v+
<?php
$x = 'test <html parm="val"/> test';
$y = htmlentities($x);
$z = html_entity_decode($y);
echo "x=$x\ny=$y\nz=$z\n";
?>
#v-
The output is (I run PHP in command-line mode):
x=test <html parm="val"/> test
y=test <html parm="val"/> test
z=test <html parm="val"/> test
-
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--