You are here: Re: multidimensional array declaration in php « PHP Programming Language « IT news, forums, messages
Re: multidimensional array declaration in php

Posted by ybakos on 07/16/06 02:21

Hi vito, you can think of php arrays as being dynamic -- you don't have
to declare it's size ahead of time like in C or Java. I'm pretty sure
they dynamically resize themselves to fit their contents.

So you would just:

for (...) {
$newArray = array(1,2,3)
$myarray[] = $newArray;
}

But 10,000 can be very big; you should think about your problem
solution.



vito wrote:
> how to achieve that? it seems php doesn't support it well for a C
> programmer?
>
> i hope to use something like:
>
> a[$i][0];
>
> a[$i][1];
>
> a[$i][2];

 

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

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