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

Posted by Parrot on 11/03/05 21:59

That works, but what I want to do is define each element of the array
in a loop rather than at declaration. It doesn't seem to be able to
return the array properly when I do that, even though I've tested the
array within the function and it works fine.

Can you give me an example of how you'd do that?


On Thu, 03 Nov 2005 08:45:44 +0100, "J.O. Aho" <user@example.net>
wrote:

><?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

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