What's the right method to round a PHP string to two decimal points?
$number = "520"; // It's a string from a database
$formatted_number = round_to_2dp($number);
echo $formatted_number;
The output ought to be
520.00;
How might the
round_to_2dp()
function definition be?