FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Word Wrap on Textareas?

 


Diablosblizz
Hey, quick question how do you do a word wrap on textareas? Is it even possible?
fadirocks
do you mean like this
http://www.htmlcodetutorial.com/forms/_TEXTAREA_WRAP.html ?
hexkid
Or maybe this?
motha
try this
Code:

<?php
$str = "An example on a long word is: Supercalifragulistic";
echo wordwrap($str,15);
?>


change your sentence in the str variable and it should go to the next line. the 15 is how many letters wide it is, words are not chopped if they are too long. you can change 15 to whatever value you want, 75 is default

You have to use a php enabled webserver

or

in the source code
Code:

<textarea>
hello
hello
</textarea>

put each line on a new line the hello's will appear on a new line
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.