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');

Tags

No tag here.

Recommended pages

Human readable file size...

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', '...

Get all subsets of array...

If you have a list of items (for example)......

Validate phone number...

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] != "+" ) { ...

Change timestamp to custom format...

Use this function for change timestamp to custom format......