stipko - 5:30 am on Jun 14, 2013 (gmt 0)
Thank you for the valiant effort. I partially understand, and you partially understand.
I suspect my quandary is less complicated than you assumed; The string will be various numbers of paragraphs. There will be occasional markup in there.
I think the solution is to count the total number of <P> in the string, and then insert the InsertString after (total * .5)
Does that make sense?
Something along the lines of;
$stringA = " ...<a href=aaa.html>Eat at joes</a>... ";
$stringB = "This is a paragraph of longer text. <p> There is more. <p> It continues. <p> And it ends <p>.";
$totalNumber = magicalFunction($stringB); \\ result is "4" let's say...
\\ Something magical splits the string at the mid-paragraph-number point...
$newString = ($firstHalfOfString . $stringA . $secondHalfOfString);
Am I being more clear?
PS: I'm happy to pay for this help. I just need this puppy solved.