开发者

textarea excess space with php

开发者 https://www.devze.com 2023-03-12 23:47 出处:网络
I have a simple text area box with php in the box on refresh: <textarea><?php//php开发者_如何学JAVA in here?></textarea>

I have a simple text area box with php in the box on refresh:

<textarea><?php    //php开发者_如何学JAVA 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?


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>
0

精彩评论

暂无评论...
验证码 换一张
取 消