Probeer dit:
$text = trim($_POST['textareaname']);
$textAr = explode("\n", $text);
$textAr = array_filter($textAr, 'trim'); // remove any extra \r chars
foreach ($textAr as $line) {
// Your sql Query here with $line as the string.
}
Probeer dit:
$text = trim($_POST['textareaname']);
$textAr = explode("\n", $text);
$textAr = array_filter($textAr, 'trim'); // remove any extra \r chars
foreach ($textAr as $line) {
// Your sql Query here with $line as the string.
}