Hi guys, long time, no post! [img]images/smilies/smile.gif[/img]
I have a database table that will contain article text for echoing to the screen as part of an HTML document. Inside this text, there may (or may not, depending on the article) be a dynamically generated image table. It has to be generated on the fly.
I have a function to query the DB and output the image table, but how can I run it from within the string?
Take this example:-
"Article text is here and then continues to here.</p>IMAGES HERE<p>Article continues..."
echo "Article text is here and then continues to here.</p><? showimages(232); ?><p>Article continues...";
..but of course, this does nothing aside from print the text.
Is there any way of doing this. I want the writers to be able to just put <? showimage(251); ?> anywhere in the body of their text (wherever they want the images to show), without having to input any more code. Also, an article may not have any images so that would need to be taken into account.
Any ideas? I'm stumped! [img]images/smilies/smile.gif[/img]