Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Josh Sneaker
Thanks, that seems to work very well (o; / Josh - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 10:17 AM Subject: Re: [PHP] Changing Bytes to KB, to megs, to gigs. > * Thus

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Curt Zirzow
* Thus wrote Matthew A. Blasinski ([EMAIL PROTECTED]): > Philip J. Newman wrote: > >My goal is to input the amount of Bytes used by a user as $inputbox and > >calculate how many kbs,megs,gigs along with $cost for the price per meg. > > [...] > > 3) Use a search and replace (regular expression) to

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Curt Zirzow
* Thus wrote Philip J. Newman ([EMAIL PROTECTED]): > My goal is to input the amount of Bytes used by a user as $inputbox and > calculate how many kbs,megs,gigs along with $cost for the price per meg. > > > $inputbox = "414478244"; > > // PROCESS DATA > $kbs = $inputbox/1024; > $megs = $kbs/102

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Matthew A. Blasinski
Philip J. Newman wrote: My goal is to input the amount of Bytes used by a user as $inputbox and calculate how many kbs,megs,gigs along with $cost for the price per meg. Questions? 1. Should I be dividing by 1024 or 1000? This was passed to me by word of mouth ... 2. Any way of rounding to 2 or 3