Omzy Posted January 3, 2009 Share Posted January 3, 2009 Why does this not work: $subcats=array( 'wedding-cakes'=>array('cakes', 'Wedding Cakes'), 'birthday-cakes'=>array('cakes', 'Birthday Cakes') ); $cat=array( 'cakes'=>array('Cakes', 'Wedding Cakes, Birthday Cakes') ); foreach($subcats as $index1 => $value1) if($subcats[$index1][0] == $cat) { //echo $subcats[$index1][1]; } Link to comment https://forums.phpfreaks.com/topic/139381-matching-data-between-two-arrays/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.