ecabrera Posted December 18, 2011 Share Posted December 18, 2011 ok i add some data in my database and i outputed the data but eveything i wrote is together and when i wroted it it had space how do i get it to display space <?php include "scripts/connect.php"; $query = mysql_query("SELECT * FROM news"); $rows = mysql_fetch_array($query); $title = $rows['title']; $by = $rows['by']; $body = $rows['body']; $query = mysql_query("SELECT * FROM main"); $rows = mysql_fetch_array($query); $maintitle = $rows['maintitle']; $bymain = $rows['by']; $main = $rows['mainbody']; mysql_close(); ?> <center><h2>NEWS TO TALK ABOUT</h2></center> <center><h1><?php echo "$maintitle";?></h1></center> News by: <?php echo "$bymain";?> <h4><?php echo "$main";?></h4> Link to comment https://forums.phpfreaks.com/topic/253399-spacess/ Share on other sites More sharing options...
manny Posted December 18, 2011 Share Posted December 18, 2011 How many results does the mysql_fetch_array() returns? Link to comment https://forums.phpfreaks.com/topic/253399-spacess/#findComment-1298938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.