I’ve created a twitter class with a method that pulls in the latest tweet depending on the user specified…uses twitter .XML
class twitter {
// Set twitter basepath
public $basepath = 'http://twitter.com/statuses';
function tweet($username){
$xml = new SimpleXMLElement($this->basepath.'/user_timeline/'. $username .'.xml?count=1', NULL, TRUE);
$status = $xml->status->text;
return '<b>' . $username . ' says: </b>' . $status;
}
}
this echo’s out
XXXXX says: @XXXX Moving it up to 10am on Sunday - it's about a 1.5 hour drive.
How do I get php to link the “@” tag as a HTML link instead of just text??
Is there a way to look for the string “@” and replace the remaining word with a href?
I’m using this one: