>if (strtoupper($searchenquiry) == strtoupper($mydata->JR) ) The problem is $searchenquiry would be contained inside $mydata->JR so I would need to see if it exists and then put <b>...</b> around it, without changing the original case.
Thanks, J "Matt M." wrote: > > $mydata->JR = eregi_replace($searchenquiry, "<b>".$searchenquiry."</b>", > > $mydata->JR); > > echo $searchenquiry; > > > > What I should display is if $searchenquiry = $mydata->JR in a case insensitive way > > then > > echo "<b>".$searchenquiry."</b>"; > > > > Do I use if (x =~ b) {} or some sort of string compare or ... ? > > John > > if you want to compare the 2 strings why not do something like this: > > if (strtoupper($searchenquiry) == strtoupper($mydata->JR) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php