vietboy505 Posted March 24, 2006 Share Posted March 24, 2006 I want my textarea box to not to have scrollbars. So depends on how long the message is, it will determine the rows. How would I do that, count the character in $message?[code]<textarea value="<?php echo $message; ?>" rows="<?php ?>" cols="20">[/code] Link to comment https://forums.phpfreaks.com/topic/5660-determine-textarea-rows/ Share on other sites More sharing options...
shocker-z Posted March 24, 2006 Share Posted March 24, 2006 dont think this is the best way but you could do:[code]$msg=explode("\n",$message");$lines=count($msg);and the user rows="<?php echo $lines; ?>"[/code]as far as i can think that should work but only work by line not for long lines which will then be wrapped.. Link to comment https://forums.phpfreaks.com/topic/5660-determine-textarea-rows/#findComment-20211 Share on other sites More sharing options...
keeB Posted March 24, 2006 Share Posted March 24, 2006 Whats the point of using a textarea if you don't want to conserve space and use scrollbars? Doesn't make much sense.. Link to comment https://forums.phpfreaks.com/topic/5660-determine-textarea-rows/#findComment-20320 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.