php - How to create a div tag for every record selected in my database -
i'm working on results page website's search engine , trying figure out how create div tag every record selected database. using php.
loop through result of $query , echo each row in div this:
$query = mysqli_query($connect, "select * mytable"); if(mysqli_num_rows($query) > 0) { while($row = mysqli_fetch_array($query)) { echo "<div>".$row['column']."</div>"; } } else { echo "<div>no results found</div>"; }
Comments
Post a Comment