Re: html_entity_decode is trying to kill me

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This info might be helpful.  If I copy and paste the example from the
manual directly, it works as described:

$orig = "I'll \"walk\" the <b>dog</b> now";
$a = htmlentities($orig);
$b = html_entity_decode($a);
echo $a; // I'll &quot;walk&quot; the &lt;b&gt;dog&lt;/b&gt; now
echo $b; // I'll "walk" the <b>dog</b> now

But if I modify $orig to include spaces like so

$orig = "I'll \"walk\" the < b >dog</b> now";

the output is
I'll "walk" the &lt; b &gt;dog&lt;/b&gt; now
I'll "walk" the &lt; b &gt;dog now

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux