Email Address Checker
This function check if an e-mail address is valid or not.
function valid_email($email) { return preg_match('/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/', $email); } echo valid_email('test@test.com');
This function check if an e-mail address is valid or not.
function valid_email($email) { return preg_match('/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/', $email); } echo valid_email('test@test.com');
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', '...
If you have a list of items (for example)......
Chek if a phone numbers is valid, according to its syntax (should be: "+390523599314"). True if it's valid, False otherwise function is_valid_phone( $phone ) { if ( $phone[0] != "+" ) { ...
Use this function for change timestamp to custom format......