<?php $array = [ ['text' => 'I like Apples', 'id' => '102923'], ['text' => 'I like Apples and Bread', 'id' =>'283923'], ['text' => 'I like Apples, Bread, and Cheese', 'id' => '3384823'], ['text' => 'I like Green Eggs and Ham', 'id' =>'4473873'] ]; $search = 'Bread'; var_export( array_filter($array, fn($subarray) => str_contains($subarray['text'], $search)) );
You have javascript disabled. You will not be able to edit any code.