santa santa - 1 year ago 92
PHP Question

split email from string with PHP

I need to be able to split a string that contains email's

information. From the string I need to extract
or whatever is available.

The string can be in the following formats:

"Santa Clause" <>

Santa Clause <>


Answer Source
$string_to_check = '"Santa Clause" <>'
$matches = array();
$matches[1] //=> Santa Claus
$matches[2] //=>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download