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 Another Very Basic Counter
PHP Upper letter in a new sentence
PHP While Looper
PHP Detecting Online Users
PHP Making RGB Colors to HEX
PHP "Build Index from Directory Listing using make_index.py"
PHP Numbers Formatting
PHP PHP Regular Expression Example - Matching HTML Tags
PHP Effective Directory Listing
PHP "Check if Accessed from the Command-Line Interface (CLI) in PHP"