Welcome Guest, Not a member yet? Register   Sign In
Format decimal removing anything before the decimal point
#1

[eluser]jtotheb[/eluser]
I hate to ask questions like this on here but i really can't work it out and was hoping someone could tell me where i'm going wrong.

I've got a value of say "0.37" and i'd like to format the string to be just "37"

I've tried:
money_format()
sprintf()
printf()
strstr()
substr()

And i can't get it to do what i want, i can remove what's after the decimal fine, it's removing what's before the decimal i'm having trouble with!

Cheers!


Messages In This Thread
Format decimal removing anything before the decimal point - by El Forum - 05-01-2008, 08:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB