note 18200 added to function.str-replace
| From: | dave at nospam dot netready dot ltd dot uk | Date: | Mon, 14 Jan 2002 12:40:58 +0000 |
| Subject: | note 18200 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24798@lists.php.net to get a copy of this message | ||
Before finding this function, to replace 'foo' with 'bar' in a string I have
been doing...
join( 'bar', explode('foo',$string) )
I have no idea how this compares speedwise, I guess str-replace should be faster. If anyone cares
to test it I'd be interested to know.
--
http://www.php.net/manual/en/function.str-replace.php
http://master.php.net/manage/user-notes.php?action=edit+18200
http://master.php.net/manage/user-notes.php?action=delete+18200
http://master.php.net/manage/user-notes.php?action=reject+18200