How can I split a big string, which contains repeating text inside it into substrings.
I have a big string ($all) which has this text repeated:
<span class="span7 listing freeListing"
I want to break this string $all into substrings stored in an array. How can I do this with php?
I am not sure I get your question, but if you want to use that substring as a separator, then
explode('<span class="span7 listing freeListing"', $all)
is what you are looking for. This will return an array
of the substrings except the separator. However, I am not sure I understood your question, since you did not specify what you are expecting exactly.