In PHP, you can use break and continue in a for loop, while loop, do...while loop, and foreach loop.
- TRUE
- FALSE
- nan
- nan
The correct option is: "True." In PHP, you can use break and continue statements in a for loop, while loop, do...while loop, and foreach loop. These statements are used to control the flow of the loop execution based on specific conditions. Learn more: https://www.php.net/manual/en/control-structures.break.php, https://www.php.net/manual/en/control-structures.continue.php
Loading...
Related Quiz
- You are writing a PHP script and you need to find the highest value in a list of numbers. How would you do this?
- What is the default keyword used for in a PHP switch statement?
- What can be potential issues when sorting arrays in PHP?
- You can use Form Handling in PHP to send data to a database.
- You have an array in your PHP script and you want to execute a block of code for each element in the array. Which type of loop would you use and why?