[PHP] rounding...sort of

2002-12-28 Thread Peter Lavender
Hi everyone,

I have a nubmer: 4.1 but I only want the whole number 4, even if it's
4.9, so this rules out using round (Unless I missed a parameter).

How could I do this.. I'm drawing a blank...

Pete




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] rounding...sort of

2002-12-28 Thread Jason Wong
On Saturday 28 December 2002 17:49, Peter Lavender wrote:
 Hi everyone,

 I have a nubmer: 4.1 but I only want the whole number 4, even if it's
 4.9, so this rules out using round (Unless I missed a parameter).

 How could I do this.. I'm drawing a blank...

floor()

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Remark of Dr. Baldwin's concerning upstarts: We don't care to eat toadstools
that think they are truffles.
-- Mark Twain, Pudd'nhead Wilson's Calendar
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] rounding...sort of

2002-12-28 Thread Justin French
php.net/floor

OR

?
list($w,$d) = split('.','4.9');
echo $w;
?

Justin French



on 28/12/02 8:49 PM, Peter Lavender ([EMAIL PROTECTED]) wrote:

 Hi everyone,
 
 I have a nubmer: 4.1 but I only want the whole number 4, even if it's
 4.9, so this rules out using round (Unless I missed a parameter).
 
 How could I do this.. I'm drawing a blank...
 
 Pete
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] rounding...sort of

2002-12-28 Thread Rasmus Lerdorf
Use explode() please

On Sun, 29 Dec 2002, Justin French wrote:

 php.net/floor

 OR

 ?
 list($w,$d) = split('.','4.9');
 echo $w;
 ?

 Justin French



 on 28/12/02 8:49 PM, Peter Lavender ([EMAIL PROTECTED]) wrote:

  Hi everyone,
 
  I have a nubmer: 4.1 but I only want the whole number 4, even if it's
  4.9, so this rules out using round (Unless I missed a parameter).
 
  How could I do this.. I'm drawing a blank...
 
  Pete
 
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php