I have a long string of text. It is more like an article, but has not markup in it. I'd like to be able to include some code into it on the output. For example, I'd like to add a link in the middle of the text. I was thinking I could embed some sort of unique text marker, something like: ~(INCLUDE HERE)~ and then detect this mark and replace with link. Am I on the right track? Shall I use preg_replace?
So it'll be something like:
$message = "Very long text...~(INCLUDE HERE)~...more text";