PDA

View Full Version : if condition check


arabuser
06-04-2013, 02:46 PM
Hi i have $file[filename] is return song.mp3

I want to check if the file extension is .mp3 how i can let if condition do it ?

i tried

<if condition="$file[filename] == 'mp3'"><EMBED SRC="http://www.mysite.com/forums/$file[filename]" hidden=false autostart=true loop=1></if>

but this didn't check the extension and ignore it

Lynne
06-04-2013, 09:54 PM
You would need to use a plugin/php in order to check.

http://php.net/manual/en/ref.strings.php