Hi,
I need to echo a full table with code & html as follow:
<?php if (isset($POST['Submit']) && $POST['Submit'] == 'Vote')
{
// echo the results of the poll
echo ' <table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td colspan="2">current vote result for this pic</td>
</tr>
<tr>
<td>hot</td>
<td> DoFormatNumber($number2, 2, '.', '');
%</td>
</tr>
<tr>
<td>not hot</td>
<td> DoFormatNumber($numbera2, 2, '.', '');
%</td>
</tr>
</table>
</td>
</tr>
<tr><td>';
}
else
{ etc...
The problem is in my first part,
DoFormatNumber is a function i created to display $number and $numbera with two decimal.
all works well when i display the table as html, but when i include it in an echo' I get a parse error , expecting ' or etc...
How am i supposed to write DoFormatNumber($numbera2, 2, '.', ''); so it is echo properly?
am i missing ()'' []?
thanks,
vinny