View Full Version : changing images?
subduck
08-26-2002, 07:58 AM
If I wanted an image to change depending what directory I'm in, how do I do that?
mordred
08-27-2002, 04:59 PM
Maybe just a to few information in your request, but look at
echo '<img src="' . basename(dirname($_SERVER['PHP_SELF'])) . '.jpg" />';
This prints out an image tag with the current directory name as the name of .jpg image file. It should not be problem tweaking this to your own need with the help of some if-constructs.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.