create a 2D array from 2 single D array

Hello
can anyone help me out with code to create a 2 dimension array from 2 single dimension array. for example
$path = array(‘base’, ‘category’, ‘subcategory’, ‘item’);
$location=array(‘india’,‘USA’,‘UK’,‘RUSSIA’,);
now i need to have a @D array which have the following structure
$final[0]=array(‘base’,‘india’);
$final[1]=array(‘category’,‘USA’);
$final[2]=array(‘subcategory’,‘UK’);
$final[3]=array(‘item’,‘RUSSIA’);

thanks in advance

Something like this:
[php]<?php
$path = array(‘base’, ‘category’, ‘subcategory’, ‘item’);
$location=array(‘india’,‘USA’,‘UK’,‘RUSSIA’,);

$final=array();
foreach($path as $key=>$val){
$final[$key][0]=$val;
$final[$key][1]=$location[$key];
}
?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service