I don't think that it does this: if ( count($elements) == 1 ) then loop 1; else loop normally; It's probably more something like that: $i=count($elements); loop: $i--; if($i == 0) $last_loop = true; else $last_loop = false if($last_loop) exit; else goto loop; But aside from that, I would propose you the same thing Robert already did - Just use while or some other loop (for maybe?). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php