Switch to full style
Dynamic open source server-side web development
Post a reply

multidimensional array merge using PHP

Tue Jun 30, 2009 10:41 am

multidimensional array merge using PHP

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);
}
?>




Post a reply
  Related Posts  to : multidimensional array merge using PHP
 Multidimensional Arrays in JSP     -  
 Multidimensional arrays in Java     -  
 lists merge     -  
 merge sort implementation in C++     -  
 Merge two or more arrays recursively     -  
 How to merge the data into file     -  
 Java merge sort example     -  
 Array difference for associate array     -  
 compare an array with another array?     -  
 PHP Array Functions     -  

Topic Tags

PHP Arrays