Number Format

From: Date: Sat, 03 Jun 2000 01:10:21 +0000
Subject: Number Format
Groups: php.general 
Request: Send a blank email to php-general+get-950@lists.php.net to get a copy of this message
Hi PHP's... I am having trouble in formating the following number: 0.306641 Instead of printing this I want to print 0.31 using printf statement of PHP. I dont' remember the exact C syntax. printf("</td><td align=right> %f KB </td><td>", $filesize/1024); what should I right in place of %f, in the above statement. How to do this. Thanx for ur help Durrani.

« previous php.general (#950) next »