Join Up!
104887 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousbreakswitchnext
Last updated: Mon, 28 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | Spanish

continue

Continue wird innerhalb von Schleifen gebraucht. Die Schleife wird an der aktuellen Stelle abgebrochen und es wird der nächste Durchlauf begonnen.

Continue kann optional ein nummerisches Argument erhalten, das angibt, wieviele Ebenen von enhaltenen Schleifen übersprungen werden sollen.

while (list ($key, $value) = each ($arr)) {
    if ($key % 2) { // überspringe ungerade Werte
        continue;
    }
    tue_was_mit_ungerade ($value);
}

$i = 0;
while ($i++ < 5) {
    echo "Außn<br>\n";
    while (1) {
        echo "&nbsp;&nbsp;Mitte<br>\n";
        while (1) {
            echo "&nbsp;&nbsp;Innen<br>\n";
            continue 3;
        }
        echo "Das wird nie ausgegeben.<br>\n";
    }
    echo "Dies auch nicht.<br>\n";
}

User Contributed Notes
continue
add a note about notes
There are no user contributed notes for this page.
previousbreakswitchnext
Last updated: Mon, 28 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST