Re: [PHP] Replacing non exact strings

2002-05-03 Thread Julio Nobrega Trabalhando
Thanks Brian, it's working! -- Julio Nobrega. "Brian Paulson" <[EMAIL PROTECTED]> wrote in message 005101c1f2af$fa59eb00$89010a0a@bpaulson">news:005101c1f2af$fa59eb00$89010a0a@bpaulson... > Julio, > > Try this -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] Replacing non exact strings

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 11:36, Julio Nobrega Trabalhando wrote: > $searched = "Joe Doe"; > $original = "Joe Cougar Doe"; > $final = "Joe Cougar Doe"; > > Any ideas about how can I achieve this result? I am currently using > eregi_replace($searched, "$searched", $original), so that's why > it only acce

RE: [PHP] Replacing non exact strings

2002-05-03 Thread Brian Paulson
Julio, Try this $search = "Joe Doe"; $original = "Joe Cougar Doe"; $final = "Joe Cougar Doe"; $terms = explode(" ",$search); for($i=0; $i".$terms[$i]."", $original); } echo $original; Should get you started. Thank You Brian Paulson Sr. Web Developer [EMAIL PROTECTED] http://w