eregi_replace problem
Posted: Mon Oct 27, 2003 10:52 am
hello all,
I try to use eregi_teplace in order to hilight search words.
here is my command:
the hilighting is ok but eregi changes my search word ($sWord) to lower or upper case (depends on how the search word was typed).
What I want to do is to be able to find the search word regardless of the case (that is why i use eregi_replace) but to display the search word (hilighted) in the original form (lower or higher case)
any ideas?
I try to use eregi_teplace in order to hilight search words.
here is my command:
Code: Select all
<?php
$hilighted=eregi_replace($sWord,"<SPAN style='background:yellow;'>$sWord</SPAN>",$resArr['field']);
?>What I want to do is to be able to find the search word regardless of the case (that is why i use eregi_replace) but to display the search word (hilighted) in the original form (lower or higher case)
any ideas?