uhm... not quite PHP...
look up the <textarea></textarea> in an html guide. How it operates. 🙂 You can put pretty much any java you want into a text area tag just like any other tag so... you just use a open/closing tag, instead of an open ended tag like <input>.
Pseudo-Code:
<textarea javascript="stuff">Text Area Text</textarea>