I think I need a basic PHP / MYSQL refresh, because nothing is working for me.
My MYSQL Table has two rows of information.
$results = mysql_query("SELECT Name, Description FROM products");
$results = mysql_fetch_assoc($results);
print_r($results);
When printing this, all I get is one result. Array ( [Name] => Banana [Description] => It's a lovely banana )
. There are definitely two results in the table. Why is this happening?
Secondly, this loop only returns the first letter of each result, and I don't know why!
foreach($results as $res) {
?>
Name : <?php echo $res['Name']; ?><br />
Description : <?php echo $res['Description']; ?><br />
<?php } ?>
My brain is seriously scrambled today :(