What is the function 'round' used for in PHP and how can it be applied to round numbers to a specific decimal place?

The 'round' function in PHP is used to round a number to the nearest integer. To round numbers to a specific decimal place, you can use the 'round' function with a second argument specifying the number of decimal places to round to.

// Round a number to 2 decimal places
$number = 123.456789;
$roundedNumber = round($number, 2);
echo $roundedNumber; // Output: 123.46