How can I make my echoed out for break automatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BloodyDuck
    New Member
    • Apr 2012
    • 1

    How can I make my echoed out for break automatically

    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?
  • Bharat383
    New Member
    • Aug 2011
    • 93

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

    Comment

    • Bharat383
      New Member
      • Aug 2011
      • 93

      #3
      echo "<div>".$name." </div>";
      echo "<div>".$commen t."</div>";
      echo "<div>".$date." </div>";
      echo "<hr>"; <------ if you wish to make separate comment ....--->

      Comment

      Working...