I have a (hopefully) quick and short question. I try to find a Javascript, Jquery, or PHP function that allows me to display every number on a webpage with two decimals. Basically, 0 should be 0.00, 1.5 should be 1.50, and 1.54 should stay 1.54.
However, most functions that I found on stackoverflow, like this one, seem to require me to put in each number manually (and don't work for integers). Is there a way I can apply the function to a class? Ideally, I am looking for a function that (1) applies to all numbers that are within the same class and (2) displays each of those numbers with two decimals, even the integers.
Thank you very much in advance for your help!