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

Posted by Chung Leong on 11/04/05 16:18

Parrot wrote:
> I already told you what I got, it was:
>
> Array
> (
> [0] => Array
> (
> [0] => Array
> (
> [0] => Hello
> [1] => World
> )
> [1] => Array
> (
> [0] => How Are
> [1] => You?
> )
> )
> )
>
> Are you sure it's PHP that's buggy? I don't want to be the handiman
> who blames his tools when something goes wrong.

That's the result from the following:

1: function test()
2:{
3: $array[0][0] = "Hello";
4: $array[0][1] = "World";
5: $array[1][0] = "How Are";
6: $array[1][1] = "You?";
7: return array($array);
8:}

The function I gave you was:

1: function test()
2:{
3: $array[0][0] = "Hello";
4: $array[0][1] = "World";
5: $array[1][0] = "How Are";
6: $array[1][1] = "You?";
7: return $array;
8:}

Note the difference at line 7.

 

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

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