Reputation: 3063
I have a simple text area box with php in the box on refresh:
<textarea><?php //php in here ?></textarea>
At the moment, the php is very long and when it does echo out the value the box should be there is a lot of white space in between. i think this is because of the large amount of php (not shown). is there a way to use the trim() or a css attribute that aligns the text to the left?
Upvotes: 1
Views: 247
Reputation: 14012
Anything between two PHP is extracted by the compiler and the result of the PHP is inserted at that point. No new lines or anything within the tags is outputted. You are also allowed to use new lines within the tags. Example:
<textarea>
<?php
for($i=0;$i<10;$i++)
{
echo("hello");
}
?>
</textarea>
Upvotes: 1