loop count php code example Example: for loop in php /* For loop in php */ <?php for ($i = 0; $i < 10; $i++) { echo $i."<br>"; } ?>