Well remember that because PHP's file inclusion functions are essentially identical to the #include preprocessor directive in C--just dumps a file into another file--the code being run is this:
PHP Code:
<?php
error_reporting ( E_ALL & ~E_NOTICE ) ;
require_once ( "numberfunction.php" ) ;
while ( $x <= 35 ) :
error_reporting ( E_ALL & ~E_NOTICE ) ;
function do_check ( &$x )
{
$dobreak = 0 ;
if ( $x == 5 OR $x == 9 ) :
$dobreak = 1 ;
endif ;
return $dobreak ;
}
endwhile ;
?>
You always need braces surrounding an include or require when using control structures or loops:
http://www.php.net/include/ (example 11-6)