I have an array that is like:
Array
(
[0] => Array
(
[product_id] => 1
[product_name] => T-Shirts
[quantity] => 2
[price] => 300
)
[1] => Array
(
[product_id] => 2
[product_name] => Red Shirt
[quantity] => 4
[price] => 200
)
[2] => Array
(
[product_id] => 3
[product_name] => Cap
[quantity] => 2
[price] => 50
)
)
I want to check whether the product_id exist or not. I tried to in_array but did not get any result.
Is there any built-in function to check it without putting the array in loop.