<?php
$formula = array(
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"振幅",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
);
$numbers = ["340","310","478","192","589",
"542","805","469","758","897",
"406","377","349","009","469",
"198","709","642","451","671",
"213","977","258","041","254",
"655","336","397","931","775",
"108","920","899","219","490",
"532","797","761","457","890",
"564","071","647","679","257",
"129","389","620","190","936",
"594","339","984","579","976",
"127","062","432","181","506",
"206","630","242","075","099",
"851","989","343","508","549",
"289","708","183","787","649",
"323","214","573","067","066",
"069","652","741","640","035",
"227","982","955","748","536",
"256","813","955","816","756",
"180","225","426","153","356",
"765","848","287","834","411",
"180","126","821","212","690",
"468","164","304","354","145",
"397","220","752","402","225",
"480","908","449","236","488",
"108","460","581","005","918",
"230","884","443","933","306",
"579","380","956","530","410",
"382","676","681","137","725",
"056","224","710","147","309",
"843","552","172","390","651",
"818","892","281","676","449",
"054","089","009","365","483",
"444","405","467","305","414",
"103","564","773","560","884",
"380","312","298","911","497",
"938","012","397","715","492",
"512","274","469","524","065",
"470","623","955","863","741",
"710","783","861","449","253",
"156","086","274","409","096",
"749","199","077","249","926",
"766","465","292","710","245",
"390","227","931","388","699",
"795","275","833","172","827",
"086","684","221","060","248",
"900","983","419","342","718",
"621","192","839","989","911",
"426","462","521","364","571",
"816","372","055","949","666",
"435","516","336","169","966",
"296","579","654","539","603",
"067","754","095","672","802",
"789","386","525","726","778",
"542","867","536","384","158",
"722","280","306","910","167",
"964","765","951","541","593",
"964","843","977","509","278",
"371","483","214","305","317",
"056","392","928","108","672",
"657","292","703","916","214",
"634","085","898"];
function zuSan($accnum){
$tmpArr = array($accnum[0], $accnum[1], $accnum[2]);
$tArray = array_unique($tmpArr);
if(count($tArray) == 3){
return false;
}
return true;
}
function zhenFu($lastacc, $accnum){
$tmpArr0 = array($lastacc[0], $lastacc[1], $lastacc[2]);
sort($tmpArr0);
$tmpArr1 = array($accnum[0], $accnum[1], $accnum[2]);
sort($tmpArr1);
$num0 = $tmpArr0[2] + $tmpArr0[0];
$num1 = $tmpArr1[2] + $tmpArr1[0];
$zf = abs($num1 - $num0);
if($zf > 9){
$zf = $zf % 10;
}
return $zf;
}
function weiZhi($index){
$msg = "";
$index = $index;
for($i=0;$i<10;$i++){
if($index == $i){
$msg = $msg . '<td style="background-color: green;">' . $i . '</td>';
}else{
$msg = $msg . "<td></td>";
}
}
return $msg;
}
echo '<table width="700" height="100" border="1" cellpadding="0" cellspacing="0">';
echo '<thead><tr><th>' . '开奖号' . '</th>';
foreach ($formula as $item){
echo '<th>' . $item . '</th>';
}
echo '</tr></thead>';
echo '<tbody>';
$length = count($numbers);
for ($i=0;$i<$length;$i++){
echo '<tr>';
$tmpArr = array($numbers[$i][0],$numbers[$i][1],$numbers[$i][2]);
sort($tmpArr);
$vNum = $tmpArr[2] + $tmpArr[0];
if($vNum > 9){
$vNum = $vNum % 10;
}
echo '<td>' . $numbers[$i] . '</td>';
$outputMsg = weiZhi($vNum);
echo $outputMsg;
if($i > 0){
echo '<td></td>';
$zf = zhenFu($numbers[$i-1],$numbers[$i]);
$outputMsg1 = weiZhi($zf);
echo $outputMsg1;
}
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
?>