> Suppose X = 7394; and you'd like to compute how many megabytes X
>evaluates. You'd probably use X / 1024 which will yield: 7.220703125.
>
> Question is: how can you limit the digits after the period, lets say 3
>digits, so the above answer would be: 7.220 = 7.22.
$M = (float) sprintf("%.2f",$X/1024);
(the float casting is not really necessary).
Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP , PHP , HTML , PDF , Excel WebFTP: This tool can be used to access FTP sites from behind any firewall
or proxy. Categories : PHP , FTP .htpassword manager for apache Categories : PHP , PHP Classes , Authentication , Apache Creates three SELECT form fields: Month, Day, and Year. You give it a string which will be used to make the name for the three fields, and a number of seconds to use as the default date. If you give it blank for this value, the current date is used. Categories : HTML and PHP , PHP , Date Time Using PHP to Delete a directory with all sub directories and files using FTP Categories : PHP , FTP , Directories , Filesystem IPhider Obscure Any URL Anonymity connection lores obfuscation corporate survival. Categories : PHP , Algorithms , Security , URLs mhash -- Compute hash Categories : PHP , PHP Functions , mhash Freshmeat.net XML-RPC - This class is meant to query Freshmeat for information about registered projects. Categories : PHP , PHP Classes , XML , Web Services How can I know about what Operating System is running on server from
PHP? Categories : PHP , Global Variables Blueshoes PHP Application Framework Categories : PHP , Frameworks , PHP Classes Validating a URL with preg_match Categories : PHP , Regexps , Beginner Guides , Data Validation Simple Email address validation Categories : Email , PHP , Strings Auto Prepend Site Configuration with PHP and Apache Categories : PHP , Apache This PHP function creates dropdown select lists for time and date that you can change, outputs a 14 char MySQL timestamp in a text field Categories : PHP , MySQL , Java Script , HTML and PHP Implementing a Members ONLY area Categories : PHP , MySQL , Databases , Authentication