When we are dealing with import functionality or something like processing of data, We need to find a way to explode a string using next line character.
For that We can use php’s inbuilt functionality explode string and using EOL

Code is as shown below

<?php
 explode(PHP_EOL,$string)
 ?>

where $string is the string to be exploded
and PHP_EOL is the php end of line

Hope this on line of code will help you to explode a string using next line character.

Leave a Reply

Your email address will not be published. Required fields are marked *