Split several lines long text


/ Published in: PHP
Save to your folder(s)

This function split a several lines long text into an array. It works with Windows and Linux texts.


Copy this code and paste it in your HTML
  1. <?php
  2. $lines = preg_split('/[\n\r]+/', $input_several_lines_long, $max_lines);
  3. ?>

URL: http://www.php.net

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.