php-general | 2003022
Date: 02/22/03
- Next message: Robert Kofler: "[PHP] bcpowmod() and BigIntegers"
- Previous message: Daniel R. Hansen: "RE: [PHP] Sitewide Header & Footer Includes || Trouble with Relative Paths.........."
- Next in thread: Hans Prins: "[PHP] Re: Question about str_replace()"
- Reply: Hans Prins: "[PHP] Re: Question about str_replace()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a simple str_replace function that obviously has a syntax
problem. The [p] in the $find array ignores the brackets. Every "p" in
my text is replaced by a <br>. Just for the heck of it, I've tried "
instead of ', and preg_replace(), etc.
$find= array('& ','W&OD', '"&"', chr(146), '[p]');
$replace= array("& ","W&OD", '"&"', "'", '<br>');
$words= str_replace ($find, $replace, $text);
Thanks.....
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Robert Kofler: "[PHP] bcpowmod() and BigIntegers"
- Previous message: Daniel R. Hansen: "RE: [PHP] Sitewide Header & Footer Includes || Trouble with Relative Paths.........."
- Next in thread: Hans Prins: "[PHP] Re: Question about str_replace()"
- Reply: Hans Prins: "[PHP] Re: Question about str_replace()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

