Hello.
There is a code
$type=array( "фильмы"=>"movie", "сериалы"=>"serial", "музыка"=>"music" ); for($i=0; $i<count($result); $i++){ preg_match_all('|<a href="blabla/[0-9]*)">(.*)</a>|U',$result[$i][3],$category,PREG_SET_ORDER); if($type[$category[0][2]] && !empty($category[0][1])) // найдено }
How can you check the presence of the value of $category
(in the loop, each can have several values) in the array $type
? The problem is that in $category
(taken with the help of preg_match_all
) there can be several values.