+ 1
Can someone explain the error to the php code below?
<?php $i = 1 do { echo "The number is" . $i . "<br/>"; $i++; } while($i < 10); ?>
3 Antworten
+ 3
Hello, Marios !
The problem is in the smallest. You just forgot to put the ";" on the variable $i which equals 1.
SoloLearn:"PHP statements end with semicolons (;)"
<?php
$i = 1;
do {
echo "The number is" . $i . "<br/>";
$i++;
}
while($i < 10);
?>
https://www.sololearn.com/learn/PHP/1793/
0
it comes up with the error Parse error: syntax error, unexpected 'do' (T_DO) in ..\Playground\ PHP Parse error: syntax error, unexpected 'do' (T_DO) in ..\Playground\
0
Thank you! I'm new with php so I didn't see that detail!