I have a variable called open which contains an email address and a url. Example: $open = "test@domain.com http://www.bbc.co.uk"; How do I split up $open so that the email address becomes $email, and the url becomes $url?
If there is a space between them you can use explode. $result = explode(' ', $string); $email = $result[0]; $url = $result[1]; PHP: