I have some data being displayed to edit in a form. In the textarea fields, there is a bunch of spaces being added after the data.
This data is being pulled from a database.
Here is the code:
<tr>
<td width="50%"><div align="right">Description: </div></td>
<td width="50"><div align="left"><textarea name="edit_release_description" id="edit_release_description" cols="45" rows="5"
<?php
if(!empty($release_no_set)){
echo '>';
echo trim($row['description'], ' ');
} else {
echo 'disabled="true"';
echo '>';
}
?>
</textarea></div></td>
</tr>
and
<tr>
<td width="50%"><div align="right">Notes:</div></td>
<td width="50"><div align="left"><textarea name="edit_release_notes" id="edit_release_notes" cols="45" rows="5"
<?php
if(!empty($release_no_set)){
echo '>';
echo $row['notes'];
} else {
echo 'disabled="true"';
echo '>';
}
?>
</textarea></div></td>
</tr>
It is only textarea fields that have the whitespace.
Also...How can I convert returns in a text area into html line breaks? I suppose I can use str_replace() somehow?