Hello i'm trying to search in a Array like SQL with the "Like %search%" statement Has anybody an idea? I need this.
Asked
Active
Viewed 231 times
-5
-
http://www.regular-expressions.info/ – techfoobar Sep 23 '16 at 11:50
-
4duplicated question... [http://stackoverflow.com/questions/5808923/filter-values-from-an-array-similar-to-sql-like-search-using-php](http://stackoverflow.com/questions/5808923/filter-values-from-an-array-similar-to-sql-like-search-using-php) – charly3pins Sep 23 '16 at 11:52
-
there are multiple ways how to search array but it's not SQL and never will be. Without you prove what did you try or show some code we cant elp – Andurit Sep 23 '16 at 11:52
1 Answers
0
I guess something like it can works:
function ArrayLike($search, $array)
{
foreach ($array => $elem)
{
if (strstr($elem, $search) !== false)
return (true);
}
return (false);
}

Victor Castro
- 1,232
- 21
- 40
-
Hello it helps a bit but not at all. I like to put out the whole Array Record – Steph Programm Sep 25 '16 at 16:13