Hi everybody,
We've all seen that stores have nice-looking pricing on their products; "1.99", "209.90" and so on.
That's easily done as well if you enter prices manually, but l et's say that we would have a database which stores prices, that are daily updated according to currency changes. Prices are therefore automatically calculated and will end up looking like "1547,83" which isn't nice at all for the eyes.
How could a function be made in PHP that both rounds prices and adjust them to be "presentable" within set tolerances depending on the size of the prize?
Thanks a lot!