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

Posted by Sergej Andrejev on 11/05/05 02:23

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?

Are you shore you don't want to pass array by reference like this:

<?
function r_array(&$array){
$array[0][0] = "a";
$array[0][1] = "b";
$array[1][0] = "c";
$array[1][1] = "d";
}

r_array($array2);
print_r($array2);
?>

 

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

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