ChompGator Posted January 11, 2009 Share Posted January 11, 2009 Hello, I have a script, that retrieves a record from a MySQL database,but right now its displaying all the information it retrieves on one line...But I want it to display the ID and Article Name on one line, then the "Article" on the line below that...So How would I create like a line break after the article name, so the description displays below ID and Article Name Code: <?php $con = mysql_connect("","","") or die('Could not connect: ' . mysql_error()); mysql_select_db("legion", $con); $result = mysql_query("SELECT * FROM signalscadet"); while($row = mysql_fetch_assoc($result)){ echo "ID: ".$row['id'].", Article Name:".$row['articlename'] .", Date:".$row['date'].", Description:".$row['description']."<br/>"; } ?> Thanks, Link to comment https://forums.phpfreaks.com/topic/140403-retrieving-record-from-mysql/ Share on other sites More sharing options...
Mchl Posted January 11, 2009 Share Posted January 11, 2009 echo "ID: ".$row['id'].", Article Name:".$row['articlename']."<br/>\nDate:".$row['date'].", Description:".$row['description']."<br/>"; Link to comment https://forums.phpfreaks.com/topic/140403-retrieving-record-from-mysql/#findComment-734805 Share on other sites More sharing options...
ChompGator Posted January 11, 2009 Author Share Posted January 11, 2009 Thanks You! Link to comment https://forums.phpfreaks.com/topic/140403-retrieving-record-from-mysql/#findComment-734809 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.