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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
tarun Posted December 6, 2006 Author Share Posted December 6, 2006 thnx m8 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.