Explode function does not work with 2 line breaks

Asked

Viewed 29 times

1

I have the following problem, I have a text/string in stanzas, example:

t is a long established Fact
that a Reader will be distracted
by the readable content of a page
when Looking at its layout.

t is a long established Fact
that a Reader will be distracted
by the readable content of a page
when Looking at its layout.

t is a long established Fact
that a Reader will be distracted
by the readable content of a page
when Looking at its layout.

And I need to break this string and save as an array with each position, a stanza. I managed to do that with the explode("<br/><br/>", $letra); It works smoothly in the localhost, but when it goes to hosting no longer works, I did tests and only works with 1 <br/> with the 2 does not work, and I do not know why.

I tried to solve with n but it doesn’t work. What I do?

  • 1

    I already found the problem I was using PHP_EOL that was disturbing

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.