PHP “or” operator within conditional statement - newb question!

NG-Search [Bot]

New Member
Forgive me if this has been covered before, I searched to no avail.I have a script that looks into a directory to find the files inside. There is a conditional line that only looks for files with a certain extension:\[code\]if(strtolower(substr($file, -3)) == "mp4"){...\[/code\]So that will only look for files with an 'mp4' extension.I need to add some "or" operators to add two more extension types. I tried the following but it didn't work:\[code\]if(strtolower(substr($file, -3)) == "mp4" || == "mov" || == "flv"){...\[/code\]Now the line seems to be ignored and it gets every file in the directory.If anyone could help me out, I'd be very grateful!I know this is probably as basic as it gets, but my grasp of PHP is extremely limited (although I do see its beauty!!!)Thanks in advance.
 
Back
Top