if ($data['status'] === 'valid') return true;
return false;
The most common way to check if an email follows the correct format is using the built-in filter_var() function. This ensures the string contains essential components like the "@" symbol and a valid domain structure. check if email exists php