php errorexception неопределенная переменная внутри array_map

// don't forget to add "use ($variableName)"
array_map(function ($list) use ($variableName) {return $list["name"] != $variableName;}, $array);
hirohito