Jump to content

Super Simple ECHO question


Rifts

Recommended Posts

Hey I'm pulling data from my database and echoing it like so

 

  
  echo  $row['chx1'] . "<br>";
  echo  $row['chx2'] . "<br>";
  echo  $row['chx3'] . "<br>";
  echo  $row['chx4'] . "<br>";
  echo  $row['chx5'] . "<br>";
  echo  $row['chx6'] . "<br>";
  echo  $row['chx7'] . "<br>";
  echo  $row['chx8'] . "<br>";
  echo  $row['chx9'] . "<br>";
  echo  $row['chx10'] . "<br>";

but it results in this if a chx# is blank

 

bla

bla

 

bla

 

 

 

bla

 

doing this causes a lot of white space if the field is blank in my database so how can I put them on different lines and not skips spaces

 

like

 

bla

bla

bla

bla

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/208051-super-simple-echo-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.