ec Posted March 29, 2008 Share Posted March 29, 2008 When ever I print using the below code, I always get bullet point next to every line...is there anyway of getting rid of this? <?php $query = "SELECT detention.pupilno, detention.reason, detention.teacherid, pupil.firstname, pupil.lastname FROM detention, pupil WHERE detention.detentiondate = '$_SESSION[detentiondate]' AND pupil.pupilno = detention.pupilno "; $result = mysql_query($query); if ($result) { while ($array= mysql_fetch_assoc($result)) { echo "<li></li>"; print "<li>$array[pupilno]: <i>$array[firstname] $array[lastname]</i></li>"; print "<li><b>Reason:</b> $array[reason]</li>"; print "<li><b>Allocated By:</b> $array[teacherid] </li>";} } ?> Link to comment https://forums.phpfreaks.com/topic/98460-bullet-points/ Share on other sites More sharing options...
Ell20 Posted March 29, 2008 Share Posted March 29, 2008 Well your using <li> which is the tag for bulletpoints, if you remove the <li> </li> tags the bullet points will go. Link to comment https://forums.phpfreaks.com/topic/98460-bullet-points/#findComment-503887 Share on other sites More sharing options...
ec Posted March 29, 2008 Author Share Posted March 29, 2008 but then is there a tag that you can use to great a new line? Link to comment https://forums.phpfreaks.com/topic/98460-bullet-points/#findComment-503892 Share on other sites More sharing options...
wildteen88 Posted March 29, 2008 Share Posted March 29, 2008 If you dont wan to use a list then just use the HTML new line tags (<br />) or paragraph tag (<p></p>) You can always use CSS however to remove the bullet points from the list. Link to comment https://forums.phpfreaks.com/topic/98460-bullet-points/#findComment-503893 Share on other sites More sharing options...
maexus Posted March 29, 2008 Share Posted March 29, 2008 http://htmldog.com/ I highly recommend reading through these excellent tutorials. Semantic markup may not seem like a big deal to some but it's a huge issue. If you have a list of items, a list is what should be used. If it's an ordered list, use <ol>, if the order doesn't have any contextual meaning and it's just a list, you can use <ul>. CSS should always be used to modify the visual look of an element, such as list-style: none; Sorry as this is off topic but is an ever growing issue as we try to get away from using tables for layouts (tables SHOULD be used for table data though, that's what they are there for.) and tag soup. Link to comment https://forums.phpfreaks.com/topic/98460-bullet-points/#findComment-503969 Share on other sites More sharing options...
soycharliente Posted March 29, 2008 Share Posted March 29, 2008 maexus is right. IF your data is a list, then you should use list elements. You can always use CSS to hide the bullets and show nothing or something else in their place. Link to comment https://forums.phpfreaks.com/topic/98460-bullet-points/#findComment-503970 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.