What\'s the easiest way to create a 2d array. I was hoping to be able to do something similar to this:
declare int d[0..m, 0..n]
Firstly, PHP doesn't have multi-dimensional arrays, it has arrays of arrays.
Secondly, you can write a function that will do it:
function declare($m, $n, $value = 0) { return array_fill(0, $m, array_fill(0, $n, $value)); }