CODE
LIBARY.COM
Home
/
PHP
PHP Get extension with explode
Get extension with explode
<? $file = "test.txt"; $part = explode(".",$file); $ext = $part[count($part)-1]; ?>
$file = "test.txt"; $part = explode(".",$file); $ext = $part[count($part)-1]; ?>
Copy to Clipboard
Related Snippets
PHP Registering REST Images in WordPress with PHP
PHP Generate a Globally Unique Identifier (GUID) in PHP
PHP Converting an Array to a Formatted String in PHP
PHP Strategy Design Pattern
PHP Web-Based PHP File Reader | File Whitelisting & Security
PHP Web-based Link Generator using PHP
PHP Website Load Time
PHP Array Extension Get
PHP Convert Snake Case to Camel Case with PHP | Laravel Inspired
PHP Usefull Functions