multidimensional array merge using PHP

Reply

Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

multidimensional array merge using PHP

 
0
  #1
Jan 6th, 2007
hai friends

I need one solution for multidimentional array merging option using php

Please send me any samples multidimensional array merging
__________________
Thanks
Vssp
Thanks
VSSP
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 138
Reputation: php_daemon is an unknown quantity at this point 
Solved Threads: 2
php_daemon php_daemon is offline Offline
Junior Poster

Re: multidimensional array merge using PHP

 
0
  #2
Jan 6th, 2007
look at array_merge() and array_merge_recursive()
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Re: multidimensional array merge using PHP

 
0
  #3
Jan 8th, 2007
I need multidimentional array merge
Thanks
VSSP
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 138
Reputation: php_daemon is an unknown quantity at this point 
Solved Threads: 2
php_daemon php_daemon is offline Offline
Junior Poster

Re: multidimensional array merge using PHP

 
0
  #4
Jan 9th, 2007
Well, those should do the job, not straightforward though. Can you give an example of what exactly you need to do?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Re: multidimensional array merge using PHP

 
0
  #5
Jan 10th, 2007
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
VSSP
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 138
Reputation: php_daemon is an unknown quantity at this point 
Solved Threads: 2
php_daemon php_daemon is offline Offline
Junior Poster

Re: multidimensional array merge using PHP

 
0
  #6
Jan 10th, 2007
I don't really follow what you're trying to do. Can you post the initial arrays and a result you want it to be?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC