I think I’ve been looking at it too long. When I run this, I have it set up to check values for debugging so it sends the values I’m looking for out to an error page. The strange thing is that val1 shows the correct value from the table, val2 however shows blank and val3, which is the count of the val2 array shows 114 which is the correct count. So the count is correct but it is not returning any values.
while ($row = mysqli_fetch_assoc($qr_list))
{
$d2 = array(
‘cuisineid’ => $row[‘cuisineid’],
‘cuisine’ => $row[‘cuisine’]);
}
$_SESSION[‘message’] = 'val1 = ’ . $row[7][‘cuisine’] . ’ – val2 = ’ . $d2[7][‘cuisine’] . ’ – val3 = ’ . count($d2);
header("Location: " . $_SESSION[‘uwserver’] . “/System_Error”);
exit();
Thanks, interesting. It returned all nulls. So I deleted the code, retyped it, and now it works. Go figure.
I figured it had to be something very strange. No idea what happened but after the redo it’s working.
And thanks for the dump command. Love it. I’ll definitely have that in the toolbox from now on.
Try this to debug the code/ data:
while ($row[] = mysqli_fetch_assoc($qr_list))
{
$d2[] = array(
'cuisineid' => $row['cuisineid'],
'cuisine' => $row['cuisine']
);
}
echo "<pre>";
var_dump($d2);
die();
That will write out the values stored in $d2 to the browser and then stop execution. It’ll help you see what’s in the array and maybe show you why it’s not acting as you expect.
Edit>>
Found the problem 
while ($row = mysqli_fetch_assoc($qr_list))
{
$d2[] = array(
'cuisineid' => $row['cuisineid'],
'cuisine' => $row['cuisine']
);
}
Notice I removed the brackets after $row in the while statement.