<?php
function try(){
$tutorial = array("D","C","B","A");
for( $i = 0 ; $i < count($tutorial) ; $i++ ){
if( $tutorial[$i] == 'A' )
$enum = 1;
else if( $tutorial[$i] == 'B' )
$enum = 2;
else if( $tutorial[$i] == 'C' )
$enum = 3;
else if( $tutorial[$i] == 'D' )
$enum = 4;
echo "$enum". "<br/>";
}
?>
当我打印出变量 ENUM 时,它总是空白.. 有什么问题?