Hi, I have a textarea in which I have say 10 lines, I want these 10 lines to be inserted as 10 records in database. I am looking for something like foreach lines in text area or something which I don't know. Anybody to help? Thanks in advance
$lines = explode("\n", $_POST['textarea']); foreach ($lines AS $line) { $line = trim($line); // Removes possible carriage return characters (\r) // Do whatever with $line } PHP: