Jump to content

strtolower


etsted

Recommended Posts

$haystack = array("gif");$fileParts = array("extension" =>"GIF", nr2 => "JPG");$fileParts = $fileParts['extension'];$fileParts = strtolower($fileParts[0]);if(in_array($fileParts, $haystack)){ echo "right";} else { echo "false";}

 

this returns false, how can i make it return true?

 

in real life, the $fileParts array is acctaully $_FILES['fileName']['name'], where i try to make the extension into lower case before the array check

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...