Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

How to display a max of two digits after the decimal point.

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

How to display a max of two digits after the decimal point.

Postby greasypalm » Wed May 07, 2003 1:06 am

Hi chaps :)

I really need some help on this it is totally doing my head in.

Right <?=$totaluniqueclicks / $MemberSignups?>
gives me the result: 8.8887362637363

How do I just get it to show the first 2 digits after the decimal point?

Help is very much appreciated :)
greasypalm
New php-forum User
New php-forum User
 
Posts: 6
Joined: Tue May 06, 2003 11:33 am

Postby pootergeist » Wed May 07, 2003 3:20 am

$numba = number_format($numba,2);
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron