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 Credit Card Number Validation
PHP Web-based ZIP Archive Creator for Directories
PHP Web Based Regex Functions - Email, Username, Domain Validation
PHP Count files in folder
PHP Proxy Detection
PHP PHP Styles for ACF Backend in WordPress 5.0
PHP Use CURL with proxy
PHP Get Website Hostname
PHP ABSPATH PHP Code: Preventing Direct Access and Exiting
PHP File Read using for looper