Voting

: two plus one?
(Example: nine)

The Note You're Voting On

gg2005 at gmail dot com
18 years ago
Don't confuse next with continue!

If you're a Perl developer starting with PHP, you might try to use "next" inside a loop to skip to the next iteration...

i.e.,

foreach ($things as $thing) {
if (something I don't like about $thing) {
next;
}
blah....
}

The php compiler will take next... but it's not going to work.

Do this instead:
foreach ($things as $thing) {
if (something I don't like about $thing) {
continue;
}
blah....
}

<< Back to user notes page

To Top