I'm trying to figure out how to convert html textarea into php array,
I've used a form with POST to deliver the query to the php script, and the php file is getting them with the following line:
$ids = array($_POST['ids']);
Needless to say that it puts everything into one line
Array ( [0] => line1 line2 line3 line4 )
I need the final results to replace this:
$numbers = array(
"line1",
"line2",
"line3",
"line4"
);
What would be the best approach to divide and re-parse it ?
preg_split()with#\r\n?|\n#.