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> Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/253399-spacess/#findComment-1298938 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.