= 0 && $pos[1] >= 0 && $pos[0] < $GRID_SIZE && $pos[1] < $GRID_SIZE) { $grid[$pos[0]][$pos[1]] = $_POST["color"]; file_put_contents('array.json', json_encode($grid)); } } ?> cellgrid
"); for($y = 0; $y < $GRID_SIZE; ++$y) { $id = "$x,$y"; $color = $grid[$x][$y]; echo ""; } echo(""); } ?>
"; echo ""; echo "
Select Color: