I have 4 paragraphs of text in one string. Each paragraph is surrounded with <p></p>
.
- My first goal is to output the first 2 paragraphs.
- My second goal it to output the remaining paragraphs somewhere else on the page. I could sometimes be dealing with strings containing more than 4 paragraphs.
I've searched on the web for anything already out there. There's quite a bit about displaying just the first paragraph, but nothing I could find about displaying paragraphs 1-2 and then the remaining paragraphs. Can anyone help here?
Not sure which to use if any, substr, strpos, etc.....?
EDIT - thanks for your answers, to clarify, the paragraphs don't contain HTML at the moment, but yes I will need the option to have HTML within each paragraph.