I am building a wordpress plugin which is generating an HTML table and sending to gravityforms html block via shortcode.
My problem is that cell contents can contain:
Notice the differing number of decimal places.
Is there a non-hack & best practice way of aligning this column data by decimal point? In this case, Aligning right will not work.
Inserting 0s is not acceptable because this indicates a degree of accuracy which is not there.
As you can see, I have attempted to use
align="char" char="." inside the td elements with no luck.
Any help anybody can help with this would be much appreciated.
Is there a way of using
printf("%8.3f",d1) or similar without actually printing to the screen? e.g. structuring the variable d1 for later use but not actually printing it?