title: How to make my output text scrollable using PHP?
body: <p>The text that I am trying to echo from <code>$data</code> is way too long and it is going off the screen beyond the boundaries of the table. In addition to that all the text is getting displayed without line breaks (or blank lines) or proper spacing.</p>
  
  <p>My simple PHP code:</p>
  
  <pre><code>&lt;div id="sampleid1" class="tabcontent" style="margin-left:48px;"&gt;
      &lt;table width="510" border="0" cellspacing="4" cellpadding="4" class="SampleClass"&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;?php echo Sample1_LABEL;?&gt;
              &lt;/td&gt;
              &lt;th align="left"&gt;&lt;strong&gt;:&lt;/strong&gt;
              &lt;/th&gt;
              &lt;td&gt;
                  &lt;?php echo $data[ 'Sample1'];?&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;?php echo Sample2_LABEL;?&gt;
              &lt;/td&gt;
              &lt;th align="left"&gt;&lt;strong&gt;:&lt;/strong&gt;
              &lt;/th&gt;
              &lt;td&gt;
                  &lt;?php echo $data[ 'Sample2'];?&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In Summary:</p>
  
  <ol>
  <li>I need the text that I am retrieving using the <code>$data</code> to get formatted in such a way that the line breaks are displayed in the output upon echoing. </li>
  <li>I need that output text to be scrollable so no text will go off the screen beyond the boundaries. </li>
  </ol>