> So, before the end HTML comment I would like to add an image.
> How do I do that?
The first thing I suggest you do is use a comment for starting and a
comment for ending - this makes it all a LOT easier to parse.
Start: <!-- TEXT STARTS -->
End: <!-- TEXT ENDS -->
Then, you get your complete text into $buffer and just:
<?
$endtag = "<!-- TEXT ENDS -->";
$imgtag = " <a href='edittext.php?pageid=X'>"
."<img src='images/edit_buttom.gif'></a>";
$output = ereg_replace($endtag, $imgtag.$endtag, $buffer);
?>
... or something similar. Not sure if < or > or ! play havoc with a
regex or not...
If you can't change your start and end comments to be unique, then
you'll have to just do the ereg_replace on every second one.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]