Я не знаю, как передать переменную, куда код>.
Код: Выделить всё
public function filter($arr, $find) {
Enumerable::from($arr)->where(function($val) { return stripos($val->item, $find) > -1; })->toArray();
}
Подробнее здесь: https://stackoverflow.com/questions/480 ... e-linq-php
Мобильная версия