Hi all,
I have a while loop running, but I want to get the output of that variable in one variable called $table
The while loop is
while(list($cart,$sku,$name,$price,$date,$quantity,$total,$options)=mysql_fetch_row($result))
{
$gtotal+=$total;
?>
<tr> <td align=center> <? echo $name ?> </td>
<td width=10> </td>
<td align=center> <? echo $quantity ?> </td>
<td width=10> </td>
<td align=center> $ <? echo $price ?> </td>
<td width=10> </td>
<td align=center> $ <? echo $total ?> </td> </tr>
<?
}
The result is of course a table which displays the name, quantity, price and total of all items, so if there are one million thousands items there will be created a table with the info of all those items.
How do I get this entire table code (in HTML) into a variable?
The main reason why I want to do this is because I want this table to appear in an e-mail, and within the mail function it's not possible to run a while loop.
Any suggestions?
Thanks!