Here is my problem, I have three variables
$content
$img1
$img2
Now $img1 happily lives in a <img src...align="right"> at the top of $content.
What I need to do is count some number of words into content (say $i words), insert the code for $img2 (ie <img src="images/$img2" align="right">) then put the rest of the $content variable back on after that.
explode(" ",$content); // gives me an array of each word in the article, but I might break it up on paragraph or line break grounds for better formatting.
for($i<=100;$i=1;$i++){
$new_content.=" $content[$i];}
//then i can simply go
$new_image="<img src=\"images/articles/$img2\">";
$new_content.=$new_image;
//then I hit problem ville, how to get the rest of $content (all words after $i) to attach to $new_content.
There is probably some easy array solution that I am missing, I hope you can help, it would be greatly appreciated.