<?php
if ($x) {
echo("<img src=\"coopsta$x.jpg\">");
}
else {
echo("Please specify an image.");
}
?>
This is the easy way. It just writes the IMG tag in plain HTML.
Or, you can go with the slightly harder way, which is to load the image and output it directly to the browser. (The .PHP file will act as an image.)
<?php
if ($x) {
$im = imagecreatefromjpeg("coopsta$x.jpg");
imagejpeg($im);
imagedestroy($im);
}
else {
echo("Please specify an image.");
}
?>
Hope this helps.