Preg Replace
De makkelijkste manier is denk ik om te exploden op . Dan met een foreach alle items doorlopen. Met substr($bier, 0, 1) == @ kijken of er @ vooraan staat. Als dat zo is dan
[COLOR= #0000BB]<?php
$string[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/preg_replace"]preg_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]#@([dw]+)#[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<a target="_new" href="http://www.twitter.nl/$1">$0</a>[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$string[/COLOR][COLOR= #007700]);[/COLOR]
?> 