$extension = end( explode( ".", $_FILES['imagen']['name'] ) );if( in_array( $extension, $arra_extensiones ) ) { ...} else { ...}