PHP splits the textarea value into an array based on the carriage return line. PHP splits the textarea value into arrays based on the line breaks of the carriage return. This article describes how PHP splits the textarea value into arrays based on the line breaks of the carriage return. For your reference, the PHP implementation splits the textarea value into an array based on the carriage return line.
This example describes how PHP splits textarea values into arrays based on carriage return. Share it with you for your reference. The specific analysis is as follows:
Textarea carriage return behavior \ r \ n
1 2 |
$ Keyword_list = trim ($ _ REQUEST ['keyword']); $ Keyword_arr = explode ("\ r \ n", $ keyword_list ); |
Note that the spaces before and after textarea should be removed; otherwise, an additional
Or you can use explode.
\ R \ n cannot be used only with double quotation marks.
Examples in this article describes how PHP splits textarea values into arrays based on carriage return. Share it with you for your reference...