I want to get Array index with a particular Substring.
Here is what I got so far:
<?php
$array = array(0 => 'blau', 1 => 'rot', 2 => 'grün', 3 => 'rot');
$key = array_search('grün', $array); // $key = 2;
$key = array_search('rot', $array); // $key = 1;
?>
It matches for the whole value. But, I want to match a substring. Is there a predefined function to achieve this goal?