How can I search value from Multidimensional array using PHP
882
Array (
[0] => Array (
[id] => 13137
[meta_value] => Chris
[field_id] => 104
[item_id] => 4413
[created_at] => 2015-06-17 17:00:21
)
[1] => Array (
[id] => 13136
[meta_value] => 0.10
[field_id] => 123
[item_id] => 4413
[created_at] => 2015-06-17 17:00:21
)
);
How would I access the meta_value (Chris) where field_id = 104?
Answer
Solution:
Make use of function
Answer
Solution:
Try this
print_r($value);
Where $array is the variable in which you have above value,
Answer
Solution:
To make the code reusable, you may define a function, like the following: