Yesterday I asked a question about array, with commas, output as column. Check it here Today I have come this far:
<?php require_once("dbconnection.php"); ?>
<?php
$sql = "SELECT amount, ingredients FROM opskriftreg LIMIT 1;";
$ingredients = explode(',', $row['ingredients']);
$amount = explode(',', $row['amount']);
echo '<table>';
for ($i = 0; $i < count($ingredients); $i++) {
echo '<tr>';
echo '<td>', $ingredients[i], '</td>';
echo '<td>', $amount[i], '</td>';
echo '</tr>';
}
echo '</table>';
?>
The site shows an empty table now, but no errors, no nothing.
Anybody got any ideas??