validate_fileExtension

Validation of image file upload for allowed file extensions

Parameters
array $value

The $_FILES array

#
array $extensions = ['jpg', 'jpeg', 'png', 'gif']

The Array of file extensions such as array('jpg', 'jpeg', 'png', 'gif')

#
Returns
boolean

TRUE if the uploaded file extension is allowed according to the given extensions, FALSE otherwise