What is the best practice for counting between two specific numbers in PHP?

When counting between two specific numbers in PHP, a common approach is to use a loop, such as a for loop, that iterates from the starting number to the ending number. Within the loop, you can perform any necessary operations or output the current number.

// Counting between two specific numbers in PHP
$start = 1;
$end = 10;

for ($i = $start; $i <= $end; $i++) {
    echo $i . " ";
}