Hello i try to remove "@" from link how can i do this?
Thanks in advance.
$string = "@username";
$mention_url = $WebsiteURL. "/". "\\0";
$string = preg_replace("/(?<!\S)@([0-9a-zA-Z_]+)/", "<a href='$mention_url'>\\0</a>", $string);
Defualt link is :
http://localhost/@username
i like this (remove @):
http://localhost/username
echo str_replace("@","",$mention_url);Str_replace('/@', '/', $url);. $url should include $mention_url and user name ($srting)