The pics dir
Posted: Sat Nov 30, 2002 3:00 pm
I was just wondering if any of you guys know how to get a pictures extenstion, (.jpg, .gif, etc ...), from the directory pics.
becuase in the pics dir there are pictures according to username, but each have a different extenstion. I know I can do this by create a big long if statement, but I have 100+ pics in that dir. Is there some sorta function that gets the extenstion?
please help.
all I have is this
?>
becuase in the pics dir there are pictures according to username, but each have a different extenstion. I know I can do this by create a big long if statement, but I have 100+ pics in that dir. Is there some sorta function that gets the extenstion?
please help.
all I have is this
Code: Select all
<?PHP
echo "<img src="pics/$username.(inscert extenstion)" alt="$username" />";
?>