RE: [PHP] Fastest commands

From: Date: Tue, 29 Apr 2003 13:37:01 +0000
Subject: RE: [PHP] Fastest commands
Groups: php.general 
Request: Send a blank email to php-general+get-145646@lists.php.net to get a copy of this message
> -----Original Message----- > From: Leif K-Brooks [mailto:eurleif@buyer-brokerage.com] > Sent: 25 April 2003 18:36 > > The fastest would most likely be: > > $content = "one, two, three"; > > $thearray = array ( > 'one' => '1', > 'two' => '2', > 'three' => '3', > ); > $content = str_replace(array_keys($thearray),$thearray,$content); What about $content = strtr($content, $thearray); ? Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@lmu.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#145646) next »