Hi,
short question:
i want to use ereg_replace to replace something with an array-element,
this is my code and its not working:
ereg_replace("<\\$([0-9])>", "\$parmarray[\\1]", $string);
parmarray is of course an array with some elements,
Here are the facts:
$parmarray = array ("", "value1", "value2");
$string = "foo <$1> bar <$2>";
output: foo $parmarray[1] bar $parmarray[2]
i want of course:
output: foo value1 bar value2
any ideas? thx in advance
-----------------------
Marc Logemann
Morelogs GmbH & Co. KG
Chief Software Architect
-----------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
- RE: [PHP] ereg_replace Brian V Bonini
- RE: [PHP] ereg_replace Brian V Bonini
- Re: [PHP] ereg_replace John Vanderbeck
- RE: [PHP] ereg_replace Brian V Bonini
- Re: [PHP] ereg_replace Robin Vickery
- RE: [PHP] ereg_replace Brian V Bonini
- Re: [PHP] ereg_replace Robin Vickery
- RE: [PHP] ereg_replace Maxim Maletsky
- [PHP] ereg_replace Wade
- Re: [PHP] ereg_replace J. Jones
- [PHP] ereg_replace Marc Logemann
- [PHP] ereg_replace Clayton Dukes
- Re: [PHP] ereg_replace Matt Greer
- Re: [PHP] ereg_replace Jason Stechschulte
- Re: [PHP] ereg_replace Rasmus Lerdorf
- [PHP] Re: ereg_replace CC Zona
- [PHP] ereg_replace Mitch Tishaw
- Re: [PHP] ereg_replace Erik Price
- [PHP] ereg_replace alexander sundli
- Re: [PHP] ereg_replace Dean E. Weimer
- [PHP] ereg_replace Nicole Lallande

