|
|
 |
RE: FN-FORUM: PHP Float
date posted 5th August 2003 17:48
How about round(float,decimal places)
Or ceil(float) round up to nearest int
Or floor(float) round down to nearest int...
:)
Rgds
Chaz.
> -----Original Message-----
> From: Rus Foster [EMAIL REMOVED]
> Sent: 05 August 2003 18:04
> To: Charles E. Gatenby
> Subject: FN-FORUM: PHP Float
>=20
>=20
>=20
> Hi All,
> Last questions for the day. I've got a string that say could=20
> be 123.4 or
> 123.323. How would I get it to 123.00. I've got the number in=20
> a variable
> which I then went to put into another varible (this case a session
> handeler)
>=20
> so I've got
> $no=3D"123.321";
>=20
> I've tried B
> $foo=3D (int) ($no);
>=20
> but didn't work. Can someone give me a push please
>=20
> Rgds
>=20
> Rus
> --=20
> w: http://www.jvds.com | Linux + FreeBSD VDS's from $15/mo
> e: [EMAIL REMOVED] | Totally Customizable Technology
> t: 07919 373537 | General FreeBSD Forums:
> 10% donation to FreeBSD | http://forums.jvds.com/viewforum.php?f=3D7
>=20
>=20
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> fido.net are pleased to sponsor these Freelancers messages. For all
> your web hosting needs check out http://www.fido.net/ with hosting
> packages starting from just =A346.95 a year including VAT.
> Free 0871 Fax2Email numbers also available online!
> http://www.fido.net/ - the internet made simple! - 0800 1072 666
>=20
> To advertise here: http://www.freelancers.net/advertising.html
>=20
> |
 |
|