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 Google Wesite Rank Check
PHP "Check if Accessed from the Command-Line Interface (CLI) in PHP"
PHP Request Method Formatter in PHP
PHP Array Simple Randomizing
PHP Getting User IP
PHP Send mail with headers
PHP Web Based Social Media Sharing Buttons
PHP Name Generator
PHP Image Size and Attributes - PHP getimagesize Function
PHP GD Clock