How can a while loop be effectively used to iterate through a specific range of values in PHP?

To iterate through a specific range of values in PHP using a while loop, you can set a starting value and an ending value, then use a while loop to iterate through the range incrementing the value by one each time until the ending value is reached.

$start = 1;
$end = 5;

while ($start <= $end) {
    echo $start . "\n";
    $start++;
}