I had this problem as got extremely fustrated when everyone yelled out GD image creation, I finally got the answer via a guy at Liverpool Unversity (thanks Keith) and a bit of creativity, its probably something real simple just no-one thinks of it, anyways....
far as I know all you want is this...
echo "<img src=\"http://www.site.com/images/img.gif\">";
I use it to output a different picture depending upon input...
if (games == "5") { "blah" }
where "blah" is the above echo statement.
Just be VERY VERY careful with all the slashes! It DOES matter if they are / or \ 🙂
Hope this helps.