Reply to Re: about return a array

Your name:

Reply:


Posted by Steve on 04/24/07 14:47

"cocobear" <cocobearc@gmail.com> wrote in message
news:1177425404.867402.321610@c18g2000prb.googlegroups.com...
| When I write this codes:
|
| <?
| function r_array(&$array){
| for($i=1;$i<5;$i++) {
| for($j=1;$j<5;$j++) {
| $array[i][j] = "d";
| }
|
| }
| }
|
| r_array($array2);
| print_r($array2);
| echo $array[1][1];
| ?>
|
| it display in the brower like this:
|
| Array ( [i] => Array ( [j] => d ) )
|
| And this means $array[1][1] can't be used. And what's the problem?
|
| I want return a 2D array and use it like $array[1][1],what should I
| do?

ummmm...put a $ in fron of i and j.

:)

[Back to original 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

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