Friday 18 May 2018

PHP error "Notice: Use of undefined constant row - assumed 'row'" MySQL

Error:




Notice: Use of undefined constant row - assumed 'row'





Relevant Code [PHP]:



if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo BuildDisplay($row['name'], $row['price'], row['link'], $sc);
if ($sc = 4) {
$sc = 1;
} else {
$sc = ($sc + 1);

}
}
} else {
echo "

No Products Available!

";
}

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...