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: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Finnish | German | Spanish

continue

continue se používá uvnitř cyklů k přeskočení zbytku aktuální iterace a bezprostřednímu přechodu na následující iteraci.

continue akceptuje nepovinný číselný argument, který říká, kolik úrovní cyklů se má naráz dokončit.

while (list ($key, $value) = each ($arr)) {
    if (!($key % 2)) { // přeskoč sudé členy
        continue;
    }
    do_something_odd ($value);
}

$i = 0;
while ($i++ < 5) {
    echo "Vnější<br>\n";
    while (1) {
        echo "&nbsp;&nbsp;Střední<br>\n";
        while (1) {
            echo "&nbsp;&nbsp;Vnitřní<br>\n";
            continue 3;
        }
        echo "Toto se nikdy nevytiskne.<br>\n";
    }
    echo "Ani tohle se neprovádí.<br>\n";
}

User Contributed Notes
continue
add a note about notes
There are no user contributed notes for this page.
previousbreakswitchnext
Last updated: Sun, 27 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