Hmm... very interesting, I did some tests with continue ; in both an included file and a function and both returned errors, but something else did work.
It returns to the main script I am assuming here's the three php files that I made and when I told it to 'continue' or in this case 'return' it skipped the rest of the script.
numbermain.php
PHP Code:
<?php
error_reporting ( E_ALL & ~E_NOTICE ) ;
require_once ( "numberfunction.php" ) ;
while ( $x <= 35 ) :
include ( "numbercount.php" ) ;
endwhile ;
?>
numbercount.php
PHP Code:
<?php
error_reporting ( E_ALL & ~E_NOTICE ) ;
global $x ;
$x++ ;
$dobreak = do_check ( $x ) ;
if ( $dobreak ) :
return ;
endif ;
echo $x . "<br />" ;
?>
numberfunction.php
PHP Code:
<?php
error_reporting ( E_ALL & ~E_NOTICE ) ;
function do_check ( &$x )
{
$dobreak = 0 ;
if ( $x == 5 OR $x == 9 ) :
$dobreak = 1 ;
endif ;
return $dobreak ;
}
?>
And the result was:
Code:
1
2
3
4
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Skipped five and nine as I had asked the script. Maybe that will help some.
Cheers,
g-force2k2