You are here: Re: Returning a 2 dimensional array « PHP Programming Language « IT news, forums, messages
Re: Returning a 2 dimensional array

Posted by Parrot on 11/04/05 07:43

>The following is what you need to create a array of arrays:
>
>function test()
>{
> $array[0][0] = "Hello";
> $array[0][1] = "World";
> $array[1][0] = "How Are";
> $array[1][1] = "You?";
> return $array;
>}
>

Yeah, that's the one I tried, but it didn't work.


>function test()
>{
> $array = array();
> $array[] = array("Hello", "World");
> $array[] = array("How are", "You?");
> return $array;
>}

This one did work. But now I'm wondering why it did and the first one
didn't?

 

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

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