By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,607 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,607 IT Pros & Developers. It's quick & easy.

How can I make my echoed out for break automatically

P: 1
In my website I am making I have a comment box, and I would like to know how I can get the comment to automatically do a line break instead of going of the page when I echo the comment out form the MySQL data base. Here is and example of the echo statement.

echo '<center>' . '<font color="blue">' . $name . '</font>' . '<br />' . $comment . '<br />' . '</center>' . $date . '<br />';

The "$comment" is what I want to automatically break. Can you help me?
Apr 20 '12 #1
Share this Question
Share on Google+
2 Replies

P: 93
echo '<div><center>' . '<font color="blue">' . $name . '</font>' . '<br />' . $comment . '<br />' . '</center>' . $date . '</div>';
Apr 21 '12 #2

P: 93
echo "<div>".$name."</div>";
echo "<div>".$comment."</div>";
echo "<div>".$date."</div>";
echo "<hr>"; <------ if you wish to make separate comment ....--->
Apr 21 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.