I am trying to convert the carraige returns (of say, a 3 paragraph record) as stored onto the MySQL database to <br> in a php page to reflect 3 physical paragraphs opposed to a continous string (i.e. one paragraph). I read the http://www.php.net/manual/en/function.nl2br.php for the nl2br function, but I'm afraid I don't understand the code, much less if it is what I am looking for.
The information from the database is returned in the source with hard returns between each paragraph but it is simply ignored by the document as there are no <br> to denote breaks. Below is the code that calls the multi-paragraph record. Thank you very much for any help provided.
<?php require_once('Connections/connTest.php'); ?>
<?php
mysql_select_db($database_connTest, $connTest);
$query_rs = "SELECT * FROM content";
$rs = mysql_query($query_rs, $connTest) or die(mysql_error());
$row_rs = mysql_fetch_assoc($rs);
$totalRows_rs = mysql_num_rows($rs);
?>
<html>
<head>
<title>Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php do { ?>
<p><?php echo $row_rs['con']; ?> </p>
<?php } while ($row_rs = mysql_fetch_assoc($rs)); ?>
<p> </p>
</body>
</html>
<?php
mysql_free_result($rs);
?>
Line Breaks -- Content Management
Moderator: General Moderators
right right
Right, I saw that article, I just don't follow how to implement into the page. Puh-lease... help! 