3
I want to display a string until occurrence X, I could only do it this way:
echo substr($conteudo, 0, strpos($conteudo, 'quebra-de-linha'));
In PHP is there a native resource that can do this? So I don’t need to string subst and strpos as I did above.
Your question is not clear, could you put an example of a
string
initial and what should be returned from it?– Kenny Rafael