CODE
LIBARY.COM
Home
/
PHP
PHP Another way to get extension
Another way to get extension
<? $file = "test.html"; echo strtok(substr($file, -4, 4),"."); ?>
$file = "test.html"; echo strtok(substr($file, -4, 4),"."); ?>
Copy to Clipboard
Related Snippets
PHP Set Featured Image in WordPress using PHP
PHP Get current filename as variable
PHP BB Code
PHP YouTube Video ID Filter for PHP Web-Based Application
PHP GD Font Test
PHP Proxy Detection Function for Web Analytics and User Blocking
PHP Making gradient background color with tables
PHP Web-based Persian, English, and Arabic Number Converter
PHP Execute system commands
PHP Listing all folder and subfolders