for in and for of php code example Example: for i php <?php for ($i = 1; $i <= 10; $i++) { echo $i; }