[Solved] Use PHP to render multiple images to the browser [closed]
You use a while loop in to fetch the results. $coverpic=””; $sql = “SELECT filename FROM photos WHERE user=”$u””; $query = mysqli_query($db_conx, $sql); if(mysqli_num_rows($query) > 0){ while($row = mysqli_fetch_row($query)) { $filename = $row[0]; $coverpic .= ‘<img src=”https://stackoverflow.com/questions/16442747/user/”.$u.”https://stackoverflow.com/”.$filename.'” alt=”pic”>’; //notice the .= to append to the string instead of overwrite } } But if you want … Read more