PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
itsmani1
Forum Regular
Posts: 791 Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:
Post
by itsmani1 » Thu Nov 16, 2006 2:54 am
i want to convert int to float how can i do so?
should give 2.00 not 2
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Thu Nov 16, 2006 4:27 am
You'll probably want to use
sprintf instead
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Thu Nov 16, 2006 6:34 am
evilchris2003
Forum Contributor
Posts: 106 Joined: Sun Nov 12, 2006 6:43 am
Location: Derby, UK
Post
by evilchris2003 » Thu Nov 16, 2006 8:57 am
just use float instead of the int in the 1st place