I'm trying to use array_walk with an anonymous function, but I always get the error
// Parse error: syntax error, unexpected T_FUNCTION in ... on line X if(!empty($myArray)) { array_walk($myArray, function(&$value, $key){ // Line X $value = '"'.$value.'"'; // Add quotes }); } The surrounding file syntax is correct. Any thoughts?