php3-list | 199807
Date: 07/17/98
- Next message: Glenn MacGregor: "[PHP3] Mail"
- Previous message: Zak Greant: "Re: [PHP3] Hijacked!"
- In reply to: Colin Viebrock: "[PHP3] "Next" command?"
- Next in thread: Colin Viebrock: "Re: [PHP3] "Next" command?"
- Reply: Colin Viebrock: "Re: [PHP3] "Next" command?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Colin Viebrock writes:
> Is there a PHP equivalent to the perl "next"? i.e. how could I do
> something like:
>
> foreach $ln ( <email protected>) {
> next if $ln =~ /^\;/;
> next if $ln =~ /^@;/;
> if($ln =~ /\; serial/) {
> ......
> }
I think you're looking for the continue statement:
while ( list( , $val ) = each( $file ) ) {
if ( ereg( "^[@]?;", $val ) ) continue;
if ( ereg( "; serial", $val ) ) {
. . .
}
}
Torben
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.tryc.on.ca/php3.html
- Next message: Glenn MacGregor: "[PHP3] Mail"
- Previous message: Zak Greant: "Re: [PHP3] Hijacked!"
- In reply to: Colin Viebrock: "[PHP3] "Next" command?"
- Next in thread: Colin Viebrock: "Re: [PHP3] "Next" command?"
- Reply: Colin Viebrock: "Re: [PHP3] "Next" command?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

