Hi List, Imagine a form where user can search for clients using a 'name' field. When submitted, there's a result page, linking results to another page with the client information.
I need to make the terms inputted at the form bold when they appear at the client information page. Problem is: When someone searchs for "Joe Doe", and the client's name is "Joe Doe", I can make it "<b>Joe Doe</b>". But when the name is "Joe Cougar Doe", I can't bold it (parts Joe && Doe) because there's this "Cougar" in the middle. The result I am looking for is "<b>Joe</b> Cougar <b>Doe</b>". So: $searched = "Joe Doe"; $original = "Joe Cougar Doe"; $final = "<b>Joe</b> Cougar <b>Doe</b>"; Any ideas about how can I achieve this result? I am currently using eregi_replace($searched, "<b>$searched</b>", $original), so that's why it only accepts the whole string. Thanks a lot, Julio Nobrega. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php