Page 1 of 1

PRINTF() help

Posted: Wed Nov 01, 2006 8:52 am
by warrenk
I am trying to line up the decimal places. Here is the code that I am using...

echo("<td>");
printf("%8.2f\n",$dspcst);
echo("</td>");

Is there anyway to right justify the output so the decimal places line up? The above code seems to left justify my output.

Thanks for any help!
Warren

Re: PRINTF() help

Posted: Wed Nov 01, 2006 8:59 am
by pwd
warrenk wrote:I am trying to line up the decimal places. Here is the code that I am using...

echo("<td>");
printf("%8.2f\n",$dspcst);
echo("</td>");

Is there anyway to right justify the output so the decimal places line up? The above code seems to left justify my output.
<td align='right'>

or

<td style='text-align:right'>

Posted: Wed Nov 01, 2006 9:44 am
by warrenk
PWD...

Thanks for your help! This worked great! :D

Warren