You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
238 B
PHTML
11 lines
238 B
PHTML
5 years ago
|
<?php
|
||
|
function file_extension($str1){
|
||
|
$str1=implode("",explode("\\",$str1));
|
||
|
$str1=explode(".",$str1);
|
||
|
$str1=strtolower(end($str1));
|
||
|
return $str1;
|
||
|
}
|
||
|
|
||
|
$file='example.txt';
|
||
|
echo "\n".file_extension($file)."\n";
|
||
|
?>
|