<?
 $cs[]=2; 
 $cs[]=13; 
 $cs[]=5; 
 $cs[]=4;
 $cs[]=8; 
 $cs[]=24; 
 $cs[]=32; 
 $cs[]=65;
 $cs[]=65; 
 $cs[]=78; 
 $cs[]=54; 
 $cs[]=38;
   
$temp=-9999999;
for($i=0; $i<count($cs); $i++) {
  if($cs[$i] > $temp)
    $temp = $cs[$i];
}
echo $temp;
?>对于php,你只需
echo max($cs);
即可