Re: html_entity_decode is trying to kill me

From: Date: Fri, 17 Feb 2012 16:09:19 +0000
Subject: Re: html_entity_decode is trying to kill me
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-316707@lists.php.net to get a copy of this message
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

« previous php.general (#316707) next »