On Thu, 20 Nov 2003, Jay Blanchard wrote:
> $foo = $_POST['textarea'];
> $newFoo = str_replace("\n", " ", $foo);
> $arrayFoo = explode(" ", $newFoo);
In the code above any spaces on the lines will also be delimiters...
I missed that part of the requirement...?
Maybe I'm not understanding the problem, but why not just use something
like $myarray = preg_split('/[\r\n]+/', $textarea) ?
--
Kelly Hallman
//Ultrafancy/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php