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 =>
if(in_array("green",$arr)){ //true //do some code here }else{ //false //ignore }