How can you output numbers with decimal points in a for loop in PHP?

When outputting numbers with decimal points in a for loop in PHP, you can use the number_format() function to format the numbers to include decimal points. This function allows you to specify the number of decimal places you want to display. You can then use a for loop to iterate through the numbers and output them with the desired formatting.

for ($i = 0; $i < 5; $i++) {
    $number = $i * 1.5; // Generate a number with decimal points
    echo number_format($number, 2) . "<br>"; // Output the number with 2 decimal places
}