// seed code
list($usec, $sec) = explode(' ', microtime());
$microtime = ((float)$usec + (float)$sec);
srand((double) $microtime * 100);
//~ seed code
$randNumber = array();
$weekday =
array("monday","tuesday","wednesday","thursday","friday","saturday","sunday"
);
for ($p = 0; $p < 10; $p++)
This is how I do in javascript:
randNumber = new Array();
for (p = 0; p < 10; p++) {
randNumber[p] = Math.floor(Math.random()*7);
}
weekday = new
Array("monday","tuesday","wednesday","thursday","friday","saturday","sunday"
)
randDay1 = weekday[randNumber[0]]
randDay2 = weekday[randNumber[1]]
2 matches
Mail list logo