title: PHP - echo sql result bit by bit
body: <p>the below code is working as expected:</p>
  
  <pre><code>    if($con){
          mysqli_select_db($con, "db3");
          $query1 = "SELECT * FROM data WHERE id = $id";
          $result = mysqli_query($con, $query1);
          while ($row = mysqli_fetch_array($result)){
              echo "&lt;b&gt;" . "Sent by: " . $row['uname'] . ":" . "&lt;/b&gt;" . "&lt;br&gt;" . $row['comment'] . "&lt;br&gt;" . "&lt;u&gt;" . "Sent on: " . $row['time'] . "&lt;/u&gt;" . "&lt;br&gt;&lt;br&gt;";
                  }
  </code></pre>
  
  <p>My issue is the the 'comment' value can be pretty long and prints off screen. Is there any way to echo out the 'comment' value 50 characters at a time for example, or insert a line break within it.</p>
  
  <p>Any help appreciated. Thanks.</p>