Re: [PHP] Integer in PHP

2002-01-22 Thread Sukumar S.

Hi,

  Use intval("2.05");

  I hope this will do the needful for you.

with regards,
Sukumar .S


On Mon, 21 Jan 2002, Jerry wrote:

> Date: Mon, 21 Jan 2002 13:35:34 -
> From: Jerry <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] Integer in PHP
> 
> Hi,
> 
> I'm new in PHP, coming from JavaScript.
> In JavaScript you had the function parseInt which was really useful.
> For example parseInt("2.05") will return 2...
> 
> How can I do that in PHP ?
> 
> Thanks.
> 
> Jerry
> 
> 
> 
> -- 
> 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]
> 

--
A real friend is one who walks in when the rest of the world walks out
--


-- 
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] Integer in PHP

2002-01-21 Thread val petruchek

intval (2.05);

Valentin Petruchek (aki Zliy Pes)

http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: "Jerry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 21, 2002 3:35 PM
Subject: [PHP] Integer in PHP


> Hi,
>
> I'm new in PHP, coming from JavaScript.
> In JavaScript you had the function parseInt which was really useful.
> For example parseInt("2.05") will return 2...
>
> How can I do that in PHP ?
>
> Thanks.
>
> Jerry
>
>
>
> --
> 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 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] Integer in PHP

2002-01-21 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 21-01-02 at 14:34 
* Jerry said

> Hi,
> 
> I'm new in PHP, coming from JavaScript.
> In JavaScript you had the function parseInt which was really useful.
> For example parseInt("2.05") will return 2...
> 
> How can I do that in PHP ?

Look up round() in the manuall.
www.php.net
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8TBmHHpvrrTa6L5oRAk0ZAKCN3zyYJQUosL82hj0I7ZL9dgI8dQCfVo+S
alX53aP+WyfMN8In1yxliwo=
=JlOa
-END PGP SIGNATURE-

-- 
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]