NYCPHP Meetup

NYPHP.org

[nycphp-talk] <textarea><?=$variable2?></textarea>

justin justin at justinhileman.info
Mon Nov 7 00:55:36 EST 2011


On Sun, Nov 6, 2011 at 7:38 PM, Rob Marscher <rmarscher at beaffinitive.com> wrote:
>
> Content goes inside the textarea block element:
> echo "<textarea name=example2 rows=10 cols=50><?=$variable2?></textarea>";
>
>


And you'll want to escape the value of $variable2 ... It gets really
awkward if $variable2 includes </textarea> :)

echo "<textarea name=example2 rows=10
cols=50><?=htmlentities($variable2)?></textarea>";



More information about the talk mailing list