I have the following bit of PHP code.
Ultimately, I'd like to store <p>Michael is 26</p>
in the $str1 variable and <p>He likes green cars.</p><p>And white footballs</p><p>And red lollies</p><p>And yellow suns</p>
in the $str2 variable.
So basically everything in the first paragraph goes in $str1 and everything thereafter goes in $str2.
<?php
$str = "<p>Michael is 26</p><p>He likes green cars.</p><p>And white footballs</p><p>And red lollies</p><p>And yellow suns</p>";
$strArray = explode('</p>', $str);
$str1 = $strArray[0] . '</p> ';
echo $str1;
// variable to export remainder of string (minus the $str1 value) ?
?>
How do I achieve this?
Many thanks for any pointers.