I wan to be able to get data from a preg_replace function or a str_replace function. For example i want to convert any string beginning with @. But i want to extract that string that begins with @ and put it in my database! So how can i just extract that specific word that begins with @?
Here is my code:
$string = "@james is awespome";
$convert = preg_replace('@','<a href="#">@$1</a>','$string');
mysql_query( insert stuff);
i want to be able to insert @james or james in the database