Jump to content

Space between php results


The Praetorian

Recommended Posts

Right. So I'm using a code to pull things out of a database. Well, when the results appear, they don't have any spaces between them. (They come out in a column, a list of entries.) How can I add spacing between each entry? I've tried putting <br /> above and below them, but that doesn't work. Neither did padding. Suggestions?Here's the code I'm using.

while ($r = mysql_fetch_array($result)){  if ($r['word'] != "")  {	echo '<h2>'.$r['word'].'</h2><br />';	if ($r['category'] != "")	  echo '<span class="blue">Category:</span> '.$r['category'].'<br />';	if ($r['pronounce'] != "")	  echo '<span class="blue">Pronunciation:</span> '.$r['pronounce'].'<br />';	if ($r['definition'] != "")	  echo ''.$r['definition'].'<br />';	if ($r['definitiontwo'] != "")	  echo ''.$r['definitiontwo'].'<br />';	if ($r['related'] != "")	  echo '<span class="blue">Related Entries:</span> '.$r['related'].'<br />';  }}

Link to comment
Share on other sites

add another <br />, one line break will push the content after it down one line, so it is on the next line, 2 line breaks will push it down 2 lines so there is a line in between the content.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...