Right now I'm working on a script that requires me to be updating a board. So I'm using a series of arrays (6x6) to act as a board.
The problem is that I can't seem to be able to update it at all. I have a script which looks like this:
PHP Code:
//#CLIENTSIDE
function onFunc() {
board = {
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
board[0][0] = 1;
echo( board[0][0] ); //returns 0 ??
}
Is there something I need to keep in mind when editing nested arrays?