Hello,
I am trying to get this to loop through all the available items in a database and return the results.
<?php
$qry = mysqli_query($con,"SELECT * FROM `favorites` WHERE `username` = '$id'") or die(mysqli_error($con));
while($rowa = mysqli_fetch_array($qry)) {
$slugname = $rowa['slug_name'];
$url = $rowa['slug'];
echo '<a href="'.$url.'>'.$slugname.'</a>"';
}
?>
I think i need a foreach loop, but not sure how todo it.
Thanks in advance