Hi. I am trying to format a variable to display as $1234.56. Prob easier if i show you my code. SO, around line 10/11 i throw that statement in and it works great ( displays as $ 481,000.00) BUT, I try the same statement a few lines down (18/19) in the same block of code, and when I view the webpage it just prints the code statment on the page, like this:
echo money_format('%(#10n', 481000);
What am i not doing right? It's not reading the php statement and i don't know why. Thanks in advance for any observations.
<? // Get Account totals for last line.
$query = "SQL statment here "
if (! ($totalPtr = QueryMSSQL ($query)))
ErrorPage ("Cannot Retrieve Account Products Information");
$mv = odbc_result ($totalPtr, 3);
$cashflow = odbc_result ($totalPtr, 4);
$ror = odbc_result ($totalPtr, 5);
setlocale(LC_MONETARY, 'en_US');
echo money_format('%(#10n', $mv); --> WORKS HERE!!
odbc_close_all();
echo <<<END
<tr>
<td><span class="boldtxt">TOTAL</span></a></td>
<td align="right"><span class="bodytxt">$mv</td>
<td align="right"><span class="bodytxt">echo money_format('%(#10n', $mv);</td> --> NOT HERE!!
<td align="center"><span class="bodytxt">$cashflow</td>
<td align="center"><span class="bodytxt">$ror</td>
<td align="center"><span class="bodytxt">-</td>
<td><span class="bodytxt"> </td>
</tr>
END;
?>