I have an array in this format:
Array ( [0] => Array ( [NUMBER] => 1 [AMOUNT] => 5 [RATE] => 1 ) [1] => Array ( [NUMBER] => 2 [AMOUNT] => 10 [RATE] => 1 ) [2] => Array ( [NUMBER] => 3 [AMOUNT] => 15 [RATE] => 1 ) )
I can loop thru array and can find the desired result but I am rather looking for some builtin function or function provided by Laravel.
Is there efficient and small way to search this array if it's given two inputs: NUMBER = 3 and AMOUNT = 5 then it returns either true/false or that particular value?
built-infunction or function provided byLaravelto perform this job.array_filter, but this function will return a filtered array instead of true/false.