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 Download a file
PHP PHP Whois Query Function for Web-based Applications
PHP Google Search Results
PHP Apache Processes
PHP Proxy Detection Function for Web Analytics and User Blocking
PHP Project Euler Problem 17
PHP Generating html file
PHP Image Size and Attributes - PHP getimagesize Function
PHP Converting an Array to a Formatted String in PHP
PHP "PHP Array Get: Retrieve a Value from an Array based on a Key"