/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Takes a needle and haystack (just like in_array()) and does a wildcard search on it's values. * * @param string $string Needle to find * @param array $array Haystack to look through * @result array Returns the elements that the $string was found in */ { foreach ($array as $key => $value) { $array[$key] = $value; } } return $array; }