What is the correct way to initiate a while loop in PHP?

To initiate a while loop in PHP, you need to specify the condition that needs to be met for the loop to continue executing. The while loop will continue to run as long as the specified condition evaluates to true. Make sure to include the opening and closing curly braces to encapsulate the code block that should be repeated within the loop.

<?php
$counter = 0;

while ($counter < 5) {
    echo "Counter: $counter <br>";
    $counter++;
}
?>