Forum Moderators: coopster
The function for printing text, printtext();, through which I pass arguments, works perfectly, and draws the text from the dbase. When the text is added to the dbase, it is converted to include the <br> and <p> tags. thats all works perfect.
What I now need to be able to do, is call a second function, printimage("imagename.jpg", "alignment"); from inside the printed text from the printtext function.
I tried putting just printimage(blah); but it wouldnt have it. I tried putting <? function?> round it...but no joy neither :(
Does any way of how I could acheive this?
Cheers,
wruk999
thanks for the reply. unfortunately, I probably didnt explain myself clear enough.
What it is, is I use a printtext function to grab specific text from a row in a dbase table. It is then returned back to the page, and displys the text into the html.
What I need to do, is at places in the text, put a call to insert an image (using a function, printimage), but I dont want to do this on the page, I want to do this in the dbase, as part of the CMS, so I need to store it in the dbase with the text.
I suppose the only other way of doing it, would be to store something else in the dbase, and do a preg_replace on it before it is outputted to the page. At the moment, this is how it is printing on the page. (This is a view source of the page, after it has been php generated and returned to the browser:
<td colspan="2" class="maintext">Testing Text<br>Another line here<p>And another para</p><?php insertimage("testimage.jpg", "left");?>
<p> </p>
Thats an exact copy of the code from the page. It isnt running the php bit through php parser - well thats what it looks like.
I hope this explains my problem a little clearer :)
Cheers,
wruk999