Cflax Posted April 24, 2011 Share Posted April 24, 2011 i have this while loop making my category links at the top of my page, but i still have the bullet after the last item. ive looked at other examples and CANNOT get mine to follow suit...help plz? $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $query1 = "SELECT * FROM ob_category"; $data1 = mysqli_query($dbc, $query1); while($row=mysqli_fetch_array($data1)){ echo '<a href="viewlistings.php">' . $row['name'] . '</a> • '; } Link to comment https://forums.phpfreaks.com/topic/234575-getting-rid-of-bullet-on-last-item-in-while/ Share on other sites More sharing options...
wildteen88 Posted April 24, 2011 Share Posted April 24, 2011 See my reply in your previous thread here http://www.phpfreaks.com/forums/index.php?topic=331263.msg1558873#msg1558873 Link to comment https://forums.phpfreaks.com/topic/234575-getting-rid-of-bullet-on-last-item-in-while/#findComment-1205510 Share on other sites More sharing options...
Cflax Posted April 24, 2011 Author Share Posted April 24, 2011 just saw it, i gave it a try and did not work it returned them all multiple times Link to comment https://forums.phpfreaks.com/topic/234575-getting-rid-of-bullet-on-last-item-in-while/#findComment-1205511 Share on other sites More sharing options...
wildteen88 Posted April 24, 2011 Share Posted April 24, 2011 Make sure this line echo implode(' •', $links); Is outside of the while loop. Link to comment https://forums.phpfreaks.com/topic/234575-getting-rid-of-bullet-on-last-item-in-while/#findComment-1205512 Share on other sites More sharing options...
Cflax Posted April 24, 2011 Author Share Posted April 24, 2011 after changing that it works great thank you so much Link to comment https://forums.phpfreaks.com/topic/234575-getting-rid-of-bullet-on-last-item-in-while/#findComment-1205515 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.