tarun Posted December 6, 2006 Share Posted December 6, 2006 Hi GuysI want to make a thing which when the variable $file is a gif filetype it echos <img src="$file"> and when it is a mp3 <embed src="$file">(or wateva the embeded tag is 4 mp3)thnx ppli really appreciate it Link to comment https://forums.phpfreaks.com/topic/29693-arrgghh-help-me/ Share on other sites More sharing options...
AbydosGater Posted December 6, 2006 Share Posted December 6, 2006 Hi, Just use the following...if (strstr("gif", $file)){echo "<img src=\"$file\"> ";} elseif (strstr("mp3", $file)){echo "<embed src=\"$file\">;} else {echo "Unknown File Type";}Abydos Link to comment https://forums.phpfreaks.com/topic/29693-arrgghh-help-me/#findComment-136298 Share on other sites More sharing options...
tarun Posted December 6, 2006 Author Share Posted December 6, 2006 thnx m8 Link to comment https://forums.phpfreaks.com/topic/29693-arrgghh-help-me/#findComment-136305 Share on other sites More sharing options...
AbydosGater Posted December 6, 2006 Share Posted December 6, 2006 No prob hope it works as you want Link to comment https://forums.phpfreaks.com/topic/29693-arrgghh-help-me/#findComment-136307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.