Best way to use for sintax
<?php
for($i=0;$i<$nr;++$i){ /*code*/ }
?>
Where $nr is an integer.
Note: ++$i is way better than $i++, the reason is that $i++ creates a variable, while ++$i doesn't. So the speed of the process will be better.
PHPmaniac presents you best methods and practices!
Niciun comentariu:
Trimiteți un comentariu