What does the below code mean (it's a lambda in the while-statement, then a colon after)? Coming from JavaScript, I have no idea what that means or even how to search for that. Can anyone help explain this?
while ($query->have_posts()): $query->the_post();
Btw I got this from WordPress but is the syntax pure PHP?
This is a less-common while structure:
while (condition):
doSomething();
endwhile;
This is not how things are traditionally done, but it is valid syntax. See while loop syntax for more details, as well as alternative control syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With