1.
Which control structure in PHP is used to execute a block of code repeatedly as long as a specified condition is true?
2.
What is the purpose of the else statement in PHP?
3.
Which of the following PHP control structures is used to evaluate an expression against multiple possible cases?
4.
What does the following PHP code snippet do?

<?php
$x = 1;
while ($x <= 5) {
echo "The number is: $x
";
$x++;
}
?>
5.
Which control structure in PHP is used to execute a block of code if a specified condition is true, and another block of code if the condition is false?
6.
What is the output of the following PHP code?

<?php
$x = 5;
if ($x > 3) {
echo "Hello";
} else {
echo "Goodbye";
}
?>
7.
Which of the following loops in PHP guarantees that the code block will be executed at least once, even if the condition is false?
8.
What will be the output of the following PHP code?

<?php
$x = 5;
do {
echo "The number is: $x
";
$x++;
} while ($x <= 3);
?>
9.
Which PHP loop is typically used for iterating over the elements of an array?
10.
What does the following PHP code snippet do?

<?php
$colors = array("Red", "Green", "Blue");
foreach ($colors as $color) {
echo "Color: $color
";
}
?>