Detect file extension function
This function is used to find the file extension also you can use pathinfo() function for get information about a file path.
function ext($file_name) { return substr($file_name, strrpos($file_name, '.') + 1); }
This function is used to find the file extension also you can use pathinfo() function for get information about a file path.
function ext($file_name) { return substr($file_name, strrpos($file_name, '.') + 1); }
Parse a string into separate words (array output). function parser($str, $char = ' ') { $str = trim($str); $str = $str . $char; $len = strlen($str); $words = array(); $w = '...
This function return formatting of file sizes in a human readable format. function formatFileSize( $size ) { $file_size = $size; $i = 0; $name = array( 'byte', 'kB', 'MB', '...
This function check if an url is valid or not. function is_valid_url($url) { return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url); }...
parse_str() is fine for simple stuff but it's not the same as PHP's built way of creating the $_GET magic variable. Why?!?......