All,
In using str_replace, I glanced at the manual and found that it can take arrays for it's arguments. Great! I thought that I could have a single search string, an array of replacement vars, and no subject. It would then replace each successive instance of the search string with the next element in the replacement array.
Sadly this is not the case.
Anyone have any recommendations on how to go about this? Best idea using p/ereg_replace? Or just a loop system in which I replace the first instance of the string each time?
I'm not great at p/ereg yet, anyone have any pointers?
Cheers,
Wes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- [PHP] What is "foo"? SED
- Re: [PHP] What is "foo"? Soeren Staun-Pedersen
- Re: [PHP] What is "foo"? Rouvas Stathis
- Re: [PHP] What is "foo"? Philip Olson
- Re: [PHP] What is "foo"? Christian Reiniger
- [PHP] str_replace rick
- Re: [PHP] str_replace Jonathan Sharp
- Re: [PHP] str_replace Rasmus Lerdorf
- RE: [PHP] str_replace Thoenen, Peter Mr. EPS
- RE: [PHP] str_replace Weston Houghton
- RE: [PHP] str_replace John W. Holmes
- Re: [PHP] str_replace Weston Houghton
- [PHP] str_replace Sebastian
- [PHP] Re: str_replace John Gray
- Re: [PHP] Re: str_replace Sebastian
- Re: [PHP] Re: str_replace Hugh Danaher
- Re: [PHP] Re: str_replace Ernest E Vogelsinger
- Re: [PHP] Re: str_replace Sebastian
- Re: [PHP] Re: str_replace Jason Sheets
- Fw: [PHP] str_replace Hugh Danaher