hi guys im having a problem with php
i want to change a for statement to while
here is the code:
<?php
$i=1;
$uitkomst = 0;
$getal = 5;
echo "Het getal is $getal<br><br>";
echo "Het totaal van $i tot en met $getal is <br>";
echo "0";
for ($i = 1;$i <= $getal;$i++){
$uitkomst = $uitkomst + $i ;
echo "+ $i";
}
echo "= $uitkomst"
?>
what do i need to change ?
EDIT: i fixed it by looking at your examples.
i need it for an assignment.
Thanks and
Greetings,
Darren Brown
Change this
To this: