Textarea Array
Posted: Mon Sep 17, 2007 4:44 pm
Hi all,
I have a textarea field set up for users to enter multiple lines of text. What i am trying to do is to put each line into an array, but for some unknown reason my solution is not working.
No matter how many times i hit enter, it gives me a 1 count.
A print_r() shows :
Any help would be greatly appreciated. Thanks
-- tarja
I have a textarea field set up for users to enter multiple lines of text. What i am trying to do is to put each line into an array, but for some unknown reason my solution is not working.
Code: Select all
$text = explode("\r\n", $text);
echo $arrcount = count($text);A print_r() shows :
Code: Select all
Array ( [0] => here is some text\\r\\nand here is some more text\\r\\nand some more text )-- tarja