This is my array output
Array
(
[0] => Array
(
[tweet_text] => Fedora 16 "Verne" released! http://t.co/lECbdzE0 #Fedora #Linux
)
[1] => Array
(
[tweet_text] => Ubuntu 11.10 "Oneiric Ocelot" released! #Ubuntu #Linux
)
)
Example to find Ubuntu
keyword. From the current array how do I filter to show only
Array ( [1] => Array (
[tweet_text] => Ubuntu 11.10 "Oneiric Ocelot" released! #Ubuntu #Linux
)
)
The code
$keywords = array('Ubuntu');
foreach ($keywords as &$keyword) {
$keyword = preg_quote($keyword);
}
$regex = "/(" . implode('|', $keywords) . ")/";
$check = preg_match($regex, $anArray);
if($check == 1) {
// here I want to display only Ubuntu
}
Let me know