3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input_arr= array( 0=>array("india0","srilanka1","pakistan0","banglades0"), 1=>array("india1","srilanka1","pakistan1","bangladesh1"), 2=>array("india2","srilanka2","pakistan2","bangladesh2"), 3=>array("india3","srilanka3","pakistan3","bangladesh3"), 4=>array("india4","srilanka4","pakistan4","bangladesh4"), 5=>array("india5","srilanka5","pakistan5","bangladesh5"), ); $result_arr= array(); for($i=0;$i<sizeof($input_arr);$i++) { if(in_array("banglades0",$input_arr[$i])) if(in_array("india0",$input_arr[$i])) $result_arr = $input_arr[$i]; }
Output for 4.3.0 - 7.1.0