Thanks a lot to anyone who can help me out! I've uploaded a gift-shop style website to a server running PHP v 5.4.19. The problem is that the image and page references that were fetched on xampp don't appear in the array on the server. Why is this and what is wrong with my code (apart from me not adopting msqli yet)?
function smallDisplay()
{
$query = mysql_query($con, "SELECT `imageSrcQ`, `productCode` FROM `products` WHERE `displayCode` >= 11 && `displayCode` <= 12");
while ($results_row = mysql_fetch_array($query))
{
$returned_results[] = array(
'productCode' => $results_row['productCode'],
'imageSrcQ' => $results_row['imageSrcQ']
);
}
return $returned_results;
}
$results = smallDisplay();
echo $results;
$x = 0;
foreach ($results as $result)
{
${'img'.$x} = $result['imageSrcQ'];
$x++;
}
echo $img0;