$result = mysql_query("SELECT * FROM $table2 WHERE $db_item_1 OR $db_item_2", $connection);
if (!mysql_num_rows($result)) {
echo "Error 13424 - not working";
exit();
}
while ($row = mysql_fetch_array($result)) {
"<tr><td scope=\"col\" style=\"font-size: 16px; color: #333333; padding: 10px 8px; border-bottom: 1px solid #919191;\"><div align=\"left\" style=\"font-size: 20px;\">" . $row['date'] . "</div></td>
<td scope=\"col\" style=\"font-size: 16px; color: #333333; padding: 10px 8px; border-bottom: 1px solid #919191;\"><div align=\"left\"></div></td>
<td scope=\"col\" style=\"font-size: 16px; color: #333333; padding: 10px 8px; border-bottom: 1px solid #919191;\"><div align=\"left\" style=\"font-size: 20px;\">" . $row['title'] . "</div></td>
<td scope=\"col\" style=\"font-size: 16px; color: #333333; padding: 10px 8px; border-bottom: 1px solid #919191;\"><div align=\"left\"></div></td>
<td scope=\"col\" style=\"font-size: 16px; color: #333333; padding: 10px 8px; border-bottom: 1px solid #919191;\"><div align=\"left\" style=\"font-size: 20px;\">" . $row['cost'] . "</div></td>
</tr>";
}
echo $complete;
?>
Apologies I thought I had clicked the php tag when pasting the code.
Thanks for your link but what I really cant get my head around is how I get the results of my while loop as one variable. I can place an echo within the "{}" and it will echo the result but then if I want to print that result again outside of the loop I cannot, it will just echo the final result..