How can the PHP round() function be used to round a number?

To round a number in PHP, you can use the round() function. This function takes two parameters: the number you want to round and the number of decimal places to round to. If the second parameter is omitted, the function will round to the nearest integer. The round() function returns the rounded number.

$number = 15.678;
$roundedNumber = round($number, 2);
echo $roundedNumber; // Output: 15.68