You are here: Re: Returning a 2 Dimensional Array « All PHP « IT news, forums, messages
Re: Returning a 2 Dimensional Array

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация