first commit
This commit is contained in:
commit
d975e212f9
35 changed files with 813 additions and 0 deletions
27
nomi-voti.php
Normal file
27
nomi-voti.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Nome</td>
|
||||
<td>Voto</td>
|
||||
</tr>
|
||||
<?php
|
||||
$voti = array("Piero"=>3, "Paolo"=>9, "Luca"=>7, "Roberto"=>3);
|
||||
$media = 0;
|
||||
foreach($voti as $name => $voto){
|
||||
$media+= $voto;
|
||||
echo "<tr>
|
||||
<td>$name</td>
|
||||
<td>$voto</td>
|
||||
</tr>";
|
||||
}
|
||||
$media = $media / count($voti);
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
echo $media;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue