ivytony Posted February 29, 2008 Share Posted February 29, 2008 because I don't want to do this: ($n * 100) . '%'; Is there any easier way to do it? thanks! Quote Link to comment Share on other sites More sharing options...
moon 111 Posted February 29, 2008 Share Posted February 29, 2008 Not that I know of. If your going to use it often you can use this: function dectopercentage($dec, $percision = 0) { return round($dec * 100, $percision) . '%'; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.