Roman Loops

By Stephen Rees-Carter

<?php

for($i = 0; $i < 10; ++$i) {
    for($ii = 0; $ii < 10; ++$ii) {
        for($iii = 0; $iii < 10; ++$iii) {
            for($iv = 0; $iv < 10; ++$iv) {
                for($v = 0; $v < 10; ++$v) {
                }
            }
        }
    }
}

If the classic variable with a for() loop is $i, then nested loop should use $ii, then $iii, $iv, $v.

See Also

PHP Features

Last updated: 14 July 2026