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); }
Resize image function for jpg format. $mood between max and min. if you choose max, this mean max size of image is $ta otherwise min size of image is $ta. function makeTheThumb( $ppath, $ta, $mood ) ...
Encrypt function return different value with each execute but decrypt function return input value. for example: first execute: encrypt('hello') => 'axxdfg34', decrypt('axxdfg34') return 'hello'...
This way useful for create mixed arguments function. function foo() { $args = func_get_args(); print_r($args); } foo(1, 1256, 6, 17); //mixed ... -------------------Out-...
Parse a string into separate words (array output). function parser($str, $char = ' ') { $str = trim($str); $str = $str . $char; $len = strlen($str); $words = array(); $w = '...