php - if($ext == ('zip' || 'png')) { echo "Is it possible ?" } -


I am currently writing a download manager and I was asking myself that this is possible:

< Pre> if ($ ext == ('zip' || 'png')) {echo "Is this possible?" }

It gives every right, so I think it is not possible. But do you know how I can do this easily? I mean, not

thanks to a lot of "if" or "switches" anyway! :)

You can enter in_array ($ ext, array ('png', 'zip) You can use ',' one more ',' more '))

see here:


Comments

Popular posts from this blog

php - multilevel menu with multilevel array -

.net - C# List<T>.Find(x=>x.Rectangle.Contains(Point)) FAIL -

objective c - iPhone and it's wireless area -