I have a JSON array that uses json_decode()
to setup the data.
I'm looking to match a certain item in the array and if it matches i need to return the entire "row" of the array, not just a single field like all of the filter_array() snippets i'm finding.
Can anyone point me in the right direction?
Data looks like this before calling json_decode()
:
[
{
"format": "default",
"media_url": "http://cpe.delvenetworks.com/000337/011911_redzonefull.mp3",
"title": "RZ - Jim Trotter",
"thumb_url": "",
"date_posted": "2011-01-19 14:58:45",
"media_type": "audio"
},
{
"format": "default",
"media_url": "http://cpe.delvenetworks.com/000337/f10bestof2010offense.mp4",
"title": "Best of O - 2010",
"thumb_url": "http://img.delvenetworks.com/bV7.120x66.jpeg",
"date_posted": "2011-01-18 16:01:45",
"media_type": "video"
},
{
"format": "default",
"media_url": "http://cpe.delvenetworks.com/000337\f10bestof2010defense.mp4",
"title": "Best od D - 2010",
"thumb_url": "http://img.delvenetworks.com/UqK.120x66.jpeg",
"date_posted": "2011-01-18 16:01:45",
"media_type": "video"
}
I need to match media_type
.