How to extract Twitter username from Search API via PHP
- by Alexia
The Twitter Search api returns results in ATOM/XML format which look like this:
<author>
<name>username (Friendly Name)</name>
<uri>http://twitter.com/username</uri>
</author>
In my PHP I can get the name field as a variable, so it would look like this:
$names = "username (Friendly Name)"
But I want to use PHP to extract them as seperate variables, like this:
$username = "username"
$friendlyName = "Friendly Name" (without parantheses)
TIA!