I habe some vars containing numbers which look like this.
when I echo this var I get 1.1 as a result, so the last 0 is been dumped. I need the 0 to be stored too though, for further calculations and so that it is printed as 1.10
how do I achieve that? can you give me an example?
I suppose I'd need floating numbers but how do I tell the script that I only need 2 digits after the preceding point?
Code:
$number1 = 1.10
when I echo this var I get 1.1 as a result, so the last 0 is been dumped. I need the 0 to be stored too though, for further calculations and so that it is printed as 1.10
how do I achieve that? can you give me an example?
I suppose I'd need floating numbers but how do I tell the script that I only need 2 digits after the preceding point?