Get each line from textarea
问题 <textarea> put returns between paragraphs for linebreak add 2 spaces at end indent code by 4 spaces quote by placing > at start of line </textarea> $text = value from this textarea; How to: 1) Get each line from this textarea ( $text ) and work with them using foreach() ? 2) Add <br /> to the end of each line, except the last one? 3) Throw each line to an array. Important - text inside textarea can be multilanguage. Have tried to use: $text = str_replace('\n', '<br />', $text); But it doesn't