<?php
$gt1 = '1';
while ($gt1 <= 50)
{
echo $gt1." x ".$gt1." = ".($gt1*$gt1). "<br>";
$gt1 = $gt1 + 1;
}
?>Iemand een idee?
<?php
$gt1 = '1';
while ($gt1 <= 50)
{
echo $gt1." x ".$gt1." = ".($gt1*$gt1). "<br>";
$gt1 = $gt1 + 1;
}
?>
<?php
for($n=1;$n<=50;$n++) {
$type = ($n%2) ? "oneven" : "even";
if($type == "even") {
echo $n . "² = " . pow($n,2) . "<br>";
}
}
?>
<?php
$tot = 50;
for($i = 2; $i <= $tot; $i++)
{
echo ($i %2 == 0) ? $i : '';
}
?>