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.

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?

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

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;	
?>

thank you vibhadevit :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.