Search Results

Search found 76 results on 4 pages for 'aman chhabra'.

Page 4/4 | < Previous Page | 1 2 3 4 

  • 2 dimensional array

    - by ankit
    we have these arrays.... $cities = array("nagpur","kanpur","delhi","chd","Noida","mumbai","nagpur"); $names = array("munish","imteyaz","ram","shyam","ankit","Rahul","mohan"); now i want a 2 dimensional array with name of city as key and all the corresponding names as its values. <?php $cities = array("nagpur","kanpur","nagpur","delhi","kanpur"); $names = array("ankit","atul","aman","amit","manu"); foreach ($cities as $i => $value) { echo "\n"; echo $value; $city=$value; $k=0; foreach ($cities as $ii => $m) { If($city==$m) { echo$names[$ii] ; $final[$i][$k]=$names[$ii]; $arr = array($city => array($k =>$names[$ii] )); $k++; } } echo"\n<tr></tr>"; } wat i tried is this.but it doesnt work.help me

    Read the article

< Previous Page | 1 2 3 4