|  | Posted by J.O. Aho on 11/03/05 09:45 
Parrot wrote:> I am trying to program a function to return a 2 dimensional array, but
 > it's not working.  I reduced the return value to 1 dimension and
 > tested that to make sure that the problem wasn't elsewhere.  It had no
 > problem when the array was 1 dimensional.
 >
 > Is there something different I need to do in order to return a 2
 > dimensional array from a function?
 
 <?PHP
 function test() {
 $array2 = array ( "First" => array("A" => 1, "B" => 2),
 "Second" => array("A" => 3, "B" => 4));
 return $array2;
 }
 
 
 print_r(test());
 ?>
 
 
 //Aho
  Navigation: [Reply to this message] |