What is a "percentage"? I.e. what do you want as output? The way I read this, you could want one of two things:
Assuming $x="040" - 1. string "40%" $percent=intval($x)."%"; 2. float 0.40 $percent=round($x/100,2); > -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]. net] On Behalf Of Scott Fletcher > Sent: Wednesday, April 10, 2002 6:13 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Convert number into percentage???? > > > Hi! > > Excuse me if I seem a bit stump on how to convert the > number to a percentage. I looked up on the function, > printf() and sprintf() and I'm still a bit stump on that. Is > there such a php function that would convert this number, > "040" to a percentage? I hope there is one. > > Thanks, > Scott > > > > -- > 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