Page 1 of 1

array question

Posted: Thu Feb 06, 2003 1:12 am
by Guy
I want to init a two dimensional array with constant values.
I can do it like this:

Code: Select all

$Arr = array(	array(1,2),
		array(3,4),
		array(5,6) );
can i do it like in c:

Code: Select all

$Arr = array(	{1,2}; or (1,2);
		{3,4}; or (3,4);

)
or something close to that syntax - i mean without calling array for each item? ( i got an error with the examples above)
Guy

Posted: Thu Feb 06, 2003 3:21 am
by volka
try the first one and you'll be happy ;)