Note how to process the contents of multiple lines entered into the form’s textarea, one by one.
Introduction.
- To be more specific, the process of putting them into an array, separating them by line breaks.
- We will receive the entered value by POST.
Code.
Taking into account the possibility that there may be multiple line feed codes, we will use two types of line feed codes (rn, r) in html After unifying to the commonly used line breaks (n), the n is inserted into the array, separating the n.
Once the characters are in the array, you can check the security of the input characters by using foreach, etc. and all you have to do is add the necessary processing.
[itemlink post_id=”1975″]