Hi,
MySQL has a table called images. This table has 4 columns named as ID, title, subtitle, image.
I want to connect to this table as print all information in the title column. I tried this:
<?php
require "../app/core/database.php";
$sql = "SELECT ID FROM images";
$result = $connection->query($sql);
while($row = $result->fetch_assoc())
{
echo $row['title'];
}
$connection->close();
?>
But, the output says Undefined array key ‘title’ in …
Please guide me.