Insert Block Inbetween Paragraphs of the Content Body Field
I think you want to be doing this on $body[0]['value']; And then in your output put echo render($content['body']); see the answer to this post on rendering fields.