Possible Duplicate:
How to create an empty array in PHP with predefined size?
In a C-based language, you can very quickly create a large multi-dimensional array that you might use in conjunction with loops for an algorithm or something. Like so:
int foo[50][40];
In PHP, how can you do this? At the moment, the only way I can think of is this:
$bar = array();
for ($a = 0; $a<50; $a++) {
for ($b = 0; $b++; $b<40) {
$bar[$a][$b] = 0;
}
}