Is there a way with PHP to insert an image next to all external links? I prefer to let people know with an exit link image that they will be leaving my site. I've been doing this manually and growing tired of it.
And why to use php when you can use css? Depending on how you work, you only have to define a class, lets says .external and use it in every external link. Then, define the class: .external { background: url('path/to/the/image/image.gif') center left; padding-right: 10px; // play with this til it work as you like } Code (markup): This is how I do it and could be also used to indicate when a link goes to a pdf or word file.