![]() |
If there's only one number after the decimal place in a value - add a 0 after it.
How would I go about pulling something like this off?
|
try the round function.
PHP Code:
g-force2k2 |
The number is already rounded to two decimal places before being store in the database. I'll try using round again before it is displayed, I don't think it'd work though.
EDIT: No dice. |
It could perhaps be the column field type that's causing the problem.
Cheers, g-force2k2 |
Quote:
The column type is varchar. |
There could perhaps be an easier way then I know of, but instead I just made a quick fucntion:
PHP Code:
PHP Code:
g-force2k2 |
Works like a charm! Thanks, g-force!
|
Quote:
Cheers, g-force2k2 |
i know you've got the way you want it already, but i may say, there is already a function in php which does that afaik
PHP Code:
|
That shows how much I use number_format :p
Thank you, Xenon and g-force2k2 for the help. :) |
All times are GMT. The time now is 07:07 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|