That's brilliant Sid... Thank you.
 
    Anything that'll run under PHP 4 though? (This is something we've been beating against for a while, so I almost screamed in joy when this thread appeared.)
 
    Cheers...

> $xml =
> 89.xml');
>
> $statuses = array();
>
> foreach ($xml->status as $status)
> {
> $text = htmlspecialchars($status->text);
> $text=preg_replace( "/(?<!<a
> href="" "<a href="">
> target=\"_blank\">\\0</a>", $text );
>
> $statuses[] = array(
> 'text' => $text,
> 'created_at' => $status->created_at,
> 'short_date' => date('M d', strtotime($status->created_at)), ); }
>
> That preg stuff is for converting URLs into HTML a tags. Change
> 123456789 to your twitter ID.
 
 
 
---
Karl

--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to