- array_slice: documentation ( source)
- sort: documentation ( source)
- shuffle: documentation ( source)
- date: documentation ( source)
- range: documentation ( source)
<?php
$lotteryMachine = range(1, 49);
for ($i=1;$i<=7;$i++) {shuffle($lotteryMachine);}
$lotteryResult = array_slice($lotteryMachine, 0, 6);
sort($lotteryResult);
print date("Y-m-d") . " 六合彩搞珠結果: " ;
foreach ($lotteryResult as $drawnNumber) {
echo $drawnNumber . " ";
}
?>