I have a variable (it happens to be a file size) whose value is 16.0986328125.
I want to print it as 16.098 (using three places past the decimal point.)
How can I do this? Here’s what I have so far:
$filesize = 16.0986328125;
echo $filesize.' KB';
See
printf