I am trying to get my query results to display each result separtlly on its own line.
Here is my code:
<?php include("dbinfo.inc.php"); $query = "SELECT * FROM boc"; $result = mysqli_query($con, $query); /* fetch associative array */ while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { //Assign variables $post_id = $row['post_id']; $date = $row['date']; $type = $row['type']; $title = $row['title']; $content = $row['content']; } ?> <?php echo "$date - <a href=\"viewnotice.php?id={$post_id}\"'>{$title}</a>"; /* free result set */ mysqli_free_result($result); mysqli_close($con); ?>
This currently displays the results like this
09-04-2015 - Rescheduling Board of Commissioners Meeting 09-04-2015 - September Committee Meetings
I would like it to display like this
09-04-2015 - Rescheduling Board of Commissioners Meeting
09-04-2015 - September Committee Meetings
Thanks