Re: multiple replaces...

From: Date: Sat, 12 Jan 2002 22:50:17 +0000
Subject: Re: multiple replaces...
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-80318@lists.php.net to get a copy of this message
----- Original Message ----- From: Dennis Moore <dmoore@ravens-nest.com> To: Paul Roberts <roberts_paul@bigfoot.com>; Lauri Vain <lauri.vain@tharapita.com>; <php-general@lists.php.net> Sent: 12. siječanj 2002 23:33 Subject: Re: [PHP] multiple replaces... > try str_replace() ... it allows you to pass an array into the replace > function. > > /dkm > > ----- Original Message ----- > From: "Paul Roberts" <roberts_paul@bigfoot.com> > To: "Lauri Vain" <lauri.vain@tharapita.com>; <php-general@lists.php.net> > Sent: Saturday, January 12, 2002 4:35 PM > Subject: Re: [PHP] multiple replaces... > > > > have a look at eval() > > > > Paul Roberts > > roberts_paul@bigfoot.com > > ++++++++++++++++++++++++ > > From: "Lauri Vain" <lauri.vain@tharapita.com> > > To: <php-general@lists.php.net> > > Sent: Saturday, January 12, 2002 11:44 AM > > Subject: [PHP] multiple replaces... > > > > > > Hello there, > > > > I have about 30 markers in the text which need to be replaced with the > value > > of a variable or an array. > > > > Common sense comes up with > > > eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("b > > lah","ho-ho-ho",text))); > > > > The list above could go on and on... I'm sure there are better ways to > > replace many markers or spans of text with something else. A loop? > Something > > even more easier and better? > > > > Thanks, > > Lauri > > -- > > Tharapita Creations > > [dynamic web applications] > > lauri.vain@tharapita.com > > Mobile: +372 53 410 610 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#80318) next »