i have some text thats inserted into the db using the textarea and i was wondering how can i count the number of \n in a string so i can use that total to use as the number of rows i want to make the edit textarea, eg:
this is to test something\nthis is the second line\nand the third line\nalso onto the fourth line\nand so on...
so i want the total in the example to be: 4
$totalrows=sumof\n
so the textarea has this in it: rows='$totalrows'
just a little feature i was wondering if possible. also i will make it so that:
if ($totalrows >= 10) {
$totalrows = 10;
}
that way the textarea wont fill the screen