昨日の処理で集計した結果を、今度はHTMLに整形して出力します。
$temp = "$Day_Count_Max<>80<><>$Time_Stamp<>"; for($index = 0; $index < @Char_Alive_Index; $index++){ $temp = $temp."$Char_Name[ $Char_Alive_Index[$index] ]"; $temp = $temp."($Char_Vote_Temp[ $Char_Alive_Index[$index] ])は、"; $temp = $temp."$Char_Name[ $Char_Vote[ $Char_Alive_Index[$index] ] ]に投票した。<br>"; } $temp = $temp."\n"; print LOGFILE $temp;
生きているキャラクターの分だけループを回します。そして、順にChar_Alive_Indexからキャラクター番号を取り出し、その人への投票数(Char_Vote_Temp)と、その人の投票先(Char_Vote)を以下のような形式で出力していきます。
ギコ(2)は、モナーに投票した。
そして、これらをHTMLのBRタグでつないで、システムメッセージ(80)扱いでログファイルに書き出します。