[PHP] Rounding a number up

2001-09-10 Thread Brandon Orther

Is there a way to round a number to the next whole number?
 
Example: 
 
Before: 1.86758
 
After:  2
 
Thank you,
 
 



Re: [PHP] Rounding a number up

2001-09-10 Thread Lance Rochelle

http://www.php.net/manual/en/function.ceil.php

- Original Message - 
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 2:19 PM
Subject: [PHP] Rounding a number up


 Is there a way to round a number to the next whole number?
  
 Example: 
  
 Before: 1.86758
  
 After:  2
  
 Thank you,
  
  
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Rounding a number up if the number is anything more than a whole number

2001-01-17 Thread Brandon Orther

Hello,

I am doing a math function where I divide one number by another.  I want it
to give me a whole number though, and if it is anything above a number I
want it to go to the next one up.

Example:

4.0001  would equal 5

3.98 would equal 4

11.023 would equal 12


  I hope you understand what I am trying to say.


Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Rounding a number up if the number is anything more thana whole number

2001-01-17 Thread Ignacio Vazquez-Abrams

On Mon, 17 Jan 2000, Brandon Orther wrote:

 Hello,

 I am doing a math function where I divide one number by another.  I want it
 to give me a whole number though, and if it is anything above a number I
 want it to go to the next one up.

 Example:

 4.0001  would equal 5

 3.98 would equal 4

 11.023 would equal 12


   I hope you understand what I am trying to say.


 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 


ceil()

-- 
Ignacio Vazquez-Abrams  [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]