Hi,
I am trying to output some values from an Access database. Because I want these printed as currency I would like to show the zeros after the decimal point for whole numbers also. Ex. my output for $90.00 is coming out $90.
Thanks
Rick
printf() allows you to specify whatever length and precision you want.
I tryed the prinf() and it did format my output but when I tryed to include it within <td> tags in a table it would print the output to the top of the screen as opposed to within the table. Why?
Nothing inherent with printf, it just sends output line echo does. Perhaps you had a missing /td or /tr in there?
I was trying to include the printf() in and echo statement like...
echo "<td><b>Price:</b></td><td>$".printf("%.2f",$prodPrice)."</td>";
That's why it didn't work!
Thanks a bunch for your help