I'm having an issue whenever I enter text into a text area and submit it to my database. The text automatically gets a <br />
tag tacked onto the end of the input. I'm not sure why and whenever I try to do the str_replace
, it only works the first time.
Keep in mind that I have text pre-placed in the text area from a query in order to be able to edit it.
$query->text = str_replace("<br />", "", $query->text);
<textarea id= "custom" name="text" rows = "10" column = "50">
<?php echo $query->text; ?>
</textarea>