0

i'm planning to put an image before the name of the file. how to do that? for example i have IMAGE1.jpg filename i want to put an JPG image before the filename.

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by ryan311
0

I think your going to have to better explain what you are trying to do. You have IMAGE1.jpg and you want to make that JPGIMAGE1.jpg?

0

example like this. i found a good example, try to click the advance editor here in daniweb. then click manage attachment in below of that you can see

<image of the psd>psd files

0

You have to collect all image type extensions icon in one image folder.and rename it as given examples.
e.g.
jpg => jpg_type.png
png => png_type.png
gif => gif_type.png

Store all above image in one folder called 'image'.
Then try below code.

<?
	$imageFile = "imagename.jpg";
	$extAr = explode('.',$imageFile);
	$ext = strtolower($extAr[count($extAr)-1]);
	$iconPath = 'image/'.$ext.'_type.png'; // jpg_type.png
	echo '<img src="'.$iconPath.'" />'.$imageFile;	
?>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.