fr**********@europe.com wrote:
I use this piece of code:
-------------
$data = $_REQUEST["data"];
$data_array = split('\\n', $data);
------------
But it doesn't work. I tried also with '\n', '\r\n' and '\\r\\n'
without success.
For some reason its working quite fine for me with this:
textarea.php:
-------------
<?php
$sent = $_REQUEST[sent];
if($sent == "yes") {
$data = $_REQUEST[data];
$data_array = split("\n", $data);
print_r($data_array);
} else {
echo "<form action='textarea.php' method='post'>";
echo "<textarea cols='10' rows='10' name='data'></textarea>";
echo "<input type='hidden' name='sent' value='yes'>";
echo "<input type='submit' value='Send'>";
echo "</form>";
}
?>
-------------
It produces this:
Array
(
[0] => data1
[1] => data2
[2] => data3
)
What exactly is going wrong?
Zilla.
--
Remove the capital letters
in my e-mail to write to me.