I need to Remove first < p> tag and replace the second
tag with < /br>
For example : I have a string '< p>Lorem Ipsum< /p>< p>is simply dummy< /p>'
I need the result as
Lorem Ipsum< br />is simply dummy
I need to Remove first < p> tag and replace the second
tag with < /br>
For example : I have a string '< p>Lorem Ipsum< /p>< p>is simply dummy< /p>'
I need the result as
Lorem Ipsum< br />is simply dummy
Maybe something like this?
$input = '<p>Lorem Ipsum</p><p>is simply dummy</p>';
$output = nl2br(trim(str_replace(array("<p>","</p>"),array("","\n"),$input)));
Example: http://3v4l.org/Kmhkh