The text that I am trying to echo from $data 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.
My simple PHP code:
<div id="sampleid1" class="tabcontent" style="margin-left:48px;">
<table width="510" border="0" cellspacing="4" cellpadding="4" class="SampleClass">
<tr>
<td>
<?php echo Sample1_LABEL;?>
</td>
<th align="left"><strong>:</strong>
</th>
<td>
<?php echo $data[ 'Sample1'];?>
</td>
</tr>
<tr>
<td>
<?php echo Sample2_LABEL;?>
</td>
<th align="left"><strong>:</strong>
</th>
<td>
<?php echo $data[ 'Sample2'];?>
</td>
</tr>
</table>
</div>
In Summary:
$data to get formatted in such a way that the line breaks are displayed in the output upon echoing. you need to set CSS to the TD tag where you echo that $data...
<td style="height:150px; overflow-y:scroll;">
My mistake.. TD dont accept overflow so you may do this::
<td style="height:150px"><div style="height:100%; overflow-y:scroll;">..PHPCODE...</div></td>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With