I have a php script that is supposed to get multiple rows from a table and then wrap each row as an array into another array.
$comQy = "SELECT * FROM comments WHERE user = '$user' ORDER BY DESC;";
$comSt = $db->prepare($revQy);
$comRes = $comSt->execute();
$coms = $comSt->fetchAll();
Later in the page, I try to echo one of the elements of the array and then it doesn't work but doesn't return an error.
<div id="comUser">
<?php echo $coms[0]['user'] ?>
</div>
I appreciate all help and I am sorry if I have made a fairly simple mistake in the php script.