Php reads the textarea, submits information in the textarea text box such as online, batch submits one row at a time, how does php split them and read them row by row into the database after obtaining them, I tried \ n \ r. I also want to know how to store the obtained data to one row in the database, generate a question about S php reading textarea, and wait online.
The textarea text box submits information, one row and one batch commit, how to split them after php gets them and read them into the database row by row, I tried \ n \ r none
In addition, I would like to ask how to store the obtained data together into one row of data in the database
------ Solution --------------------
Generate an SQL command string
PHP code
$ Ar = preg_splie ("/[\ r \ n] +/", $ _ POST ['text'], 0, PREG_SPLIT_NO_EMPTY ); $ SQL = "INSERT INTO tbl_name (textfield) VALUES "('". join ("'), ('", $ ar ). "')";