??      count-for.php     
<html>
<head>
<title>6.2??????????????</title>
</head>

<body>
<h3>6.2??????????????</h3>
<h4>?count.php?for??????????</h4>
?50??????????????<br />

<?php
$tokuten = array(
52,29,58,98,100,91,27,51,92,85,61,90,75,14,12,95,61,90,47,12,94,7,15,14,95,61,97,59);

$max = count($tokuten);

#50????????????????????

$count = 0;
for($index = 0;$index < $max;$index++){
if($tokuten[$index] >= 50){
echo "?50???????????\$tokuten[$index]???? $tokuten[$index] ????<br />\n";
$count++;
}
}

echo "<br />\n";
echo "??50?????????????? $count ??????<br />\n";
echo "????????? $max ??????<br />\n";

?>

</body>
</html>