Declaring static arrays in php
- by user220201
Hi,
I am new to php. I was wondering how I could declare a static array in php. Here is what I would do in C. How is the corresponding php code for it?
char a[][] = { (1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3) };
From what I read it has to be something like this -
$a = array( 1 = array(1,1), 2 = array(1,2), ... );
Is this correct? If so it sucks :) I hope I am wrong.
Thanks,
- Pav