PDA

View Full Version : multidimensional array merge using PHP



gilbertsavier
29 Jun 2009, 03:35 AM
hai friends

I need one solution for multidimentional array merging option using php

Please send me any samples multidimensional array merging
==============
multidimensional array merge using PHP
---
Here is the sample code


<?php
$tstats=array ( "160x600" => array ("0" => "21","1"=> "1" ,"2" => "0" ,"3" => "0" ), "300x250" => array ( "0" => "32" ,"1" => "2" ,"2" => "0" ,"3" => "0" ) );
//$products=array ( "160x600" => array ("0" => "21","1"=> "1" ,"2" => "0" ,"3" => "0" ));
//$result="";
while(list($k, $s) = each($tstats))
{
$prodects1=array ($k=>$s[0]);
///$result=array_push($tstats, $prodects1);
print "<br>";
//print_r($tstats);
}
?>

Thanks & regards
Lokananth