I have an array and I\'d like to search for the string \'green\'. So in this case it should return the $arr[2]
\'green\'
$arr[2]
$arr = array(0 =>
A quick search for a phrase in the entire array might be something like this:
if (preg_match("/search/is", var_export($arr, true))) { // match }