Well, if you want to use 2D arrays this is done nearly the same way as VB. The difference is the way you access them.
In VB it's array-name(dimension1, dimension2), in PHP, it's array-name[dimension1][dimension2]...
And, for the random number, you use rand(min, max), like TIron=rand(1,100)...
So, your code:
For X = 0 To UNISPAN
For Y = 0 To UNISPAN
intTIron(X, Y) = Int(((100 - 50 + 1) * Rnd()) + 50)
intTGold(X, Y) = Int(((100 - 50 + 1) * Rnd()) + 50)
intTFert(X, Y) = Int(((100 - 50 + 1) * Rnd()) + 50)
intTWood(X, Y) = Int(((100 - 50 + 1) * Rnd()) + 50)
intTSton(X, Y) = Int(((100 - 50 + 1) * Rnd()) + 50)
Next
Next
Would become something like this:
<?PHP
for ($x=1; $x<=1000; $x++);
for ($y=1; $y<=1000; $y++);
TIron[x][y] = rand(1,100);
TGold[x][y] = rand(1,100);
TFert[x][y] = rand(1,100);
TWood[x][y] = rand(1,100);
TSton[x][y] = rand(1,100);
}
}
?>
Note: You do not have to set up the array, just start using it. PHP will auto-type the values. So, you may wish to set the values assigned in this loop as integers. Use intval(rand(1,100)) to make sure it is an integer.
Lastly, make sure you create these values OUTSIDE of any functions. The creation of the arrays should be done in the main program not inside a function. The reason being the "scope" of the array would not be available if created inside a function. Variables and arrays created inside a function are gone when the function is done, unless they have been made global variables.
Hope that helps.. Good luck with your game!