Jump to content

[SOLVED] Matching Terms.


phorcon3

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/79990-solved-matching-terms/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.