Nieuw lid |
|
<?php
$begin=1;
$end=10;
?>
<html>
<head>
<title>Deeltabel</title>
</head>
<body>
<table border="1">
<?php
print("<tr>");
print("<th>X</th>");
for(
$count_1=$begin;
$count_1<=$end;
$count_1++)
{print("<th>$count_1</th>");
}
print("</tr>");
for(
$count_1 = $begin;
$count_1 <= $end;
$count_1++)
{print("<tr><th>$count_1</th>"};
for($count_2 = $begin;
$count_2 <= $end;
$count_2++)
{
$result = $count_1 / $count_2;
printf("<td>%.3f</td>",
$result);
}
print("</tr>/n");
}
?>
</table>
</body>
</html>
<?php $begin=1; $end=10; ?> <html> <head> <title>Deeltabel</title> </head> <body> <table border="1"> <?php for( $count_1=$begin; $count_1<=$end; $count_1++) {print("<th>$count_1</th>"); } for( $count_1 = $begin; $count_1 <= $end; $count_1++) {print("<tr><th>$count_1</th>"}; for($count_2 = $begin; $count_2 <= $end; $count_2++) { $result = $count_1 / $count_2; $result); } } ?> </table> </body> </html>
Weet iemand wat hier de fout is?
vinTage edit..code tags plz !!
|