I'm currently writing sort of a download manager and I was asking myself if that was possible:
if($ext == ('zip' || 'png')) { echo "Is it possible ?" }
It returns true everytime, so I guess it's not possible. But do you have an idea about how I could easily do this ? I mean, not with plenty of "if" or "switch"...
Thanks anyway ! :)
you could use in_array($ext,array('png','zip','another','more'))
see here: http://php.net/manual/en/function.in-array.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With