Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Detect file extension, function PHP
<?php
function extensie($name){
if(empty($name)){
return;
}
$name = explode(".",strrev($name));
if(!isset($name[0]))return;
return strrev($name[0]);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.