phorcon3 Posted December 3, 2007 Share Posted December 3, 2007 foreach($this as $value) { if(ereg($_GET['search'], $value)) { echo $value; } } I do know that ereg is looking for an exact match, whereas eregi is case-insensitive ..but is there any php function you can use so it searches for the first exact match from left to right example: $_GET['search'] == 'An'; then Andreas Franklin = TRUE; and Georg Antonio = FALSE; Geesh, I hope that makes sense lol ...I'd appreciate it if anyone can help me with this. Thanks. Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 3, 2007 Share Posted December 3, 2007 if(ereg("^".$_GET['search'], $value)) add ^ at the start Quote Link to comment Share on other sites More sharing options...
phorcon3 Posted December 3, 2007 Author Share Posted December 3, 2007 lool thanks, man. appreciate it! Quote Link to comment Share on other sites More sharing options...
MadTechie Posted December 3, 2007 Share Posted December 3, 2007 welcome, just click topic solved bottom left Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.