I'm generating an array of random numbers, between 0 and 2 with this code:
for ($j = 0; $j < 60; $j++) {
for ($i = 0; $i < 100; $i++) {
$value = rand(0,2);
$DBH->query("INSERT INTO map (x, y, value) VALUES($i, $j, $value);");
}
And i found and oddity, as you may see here, the rows are random, but they repeat:
22121000210211220022122200120200122000122121 22121000210211220022122200120200122000122121 22121000210211220022122200120200122000122121 22121000210211220022122200120200122000122121 22121000210211220022122200120200122000122121
How can avoid that?