Re: &amp

From: Date: Wed, 28 Jan 2004 17:54:33 +0000
Subject: Re: &amp
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-176084@lists.php.net to get a copy of this message
On Wednesday 28 January 2004 10:23 am, Stuart wrote: > Not from where I'm sitting [PHP 4.3.3RC1 (cli) (built: Jun 21 2003 > 23:40:27) on FreeBSD built from ports]. Code... > Hey, as least we can agree with something..... FreeBSD :) > print str_replace('&', '&', 'Here is one & and here is > another &'); > > ... outputs ... > > Here is one & and here is another & > You're absolutely correct. I jumped the gun way too early. My experience with replacing & with & is that if the content already contains entity content, for example   Running str_replace will mess them up. > Do you need more coffee? Maybe some latte ;)

« previous php.general (#176084) next »