+ 1
Php loop
<?php $i = 1; while ($i < 10) { echo "The value is $i <br />"; $i=+2; } ?> whats wrong with this code it executes continously
3 ответов
+ 9
$i = +2 means $i = 2.
As 2 is less than 10, it's an infinite loop.
+ 1
xo in php you cant use =+ to increment like other languages?
+ 1
$i+=2