I need to search an array for a string, with a twist. E.g.:

$array = array(0 => 'this sky is blue', 1 => 'pencils are orange', 2 => 'I like green apples', 3 => 'strawberries are red');

$key = array_search('green', $array);

With the above code, nothing will be returned, but I would like it to return 2 for the key containing "green". Any suggestions?

...René

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to