I have setup in Wordpress a custom post type ( Artists )...
I have a plugin that serializez the meta information from the Artists .. and i need to filter this informatio
Array filter was a good try, did you do it like this :
$channel = 'trance';
$show_data = array_filter($show_data, function($data) use ($channel) {
return $data['channel'] == $channel;
});
You can do it by array_filter()
using any key has value.
For e.g Channel => trance
then it will return matched arrays.
$value = 'trance';
$key = 'channel';
$show_data = array_filter($array, function($itrate) use ($value,$key) {
return $itrate[$key] == $value;
});
See : Live Demo