I need some help with twitter hashtag, I need to extract a certain hashtag as string variable in PHP. Until now I have this
$hash = preg_replace (\"/#(\\\\w
As i understand you are saying that
in text/pargraph/post you want to show tag with hash sign(#) like this:- #tag
and in url you want to remove # sign because the string after # is not sended to server in request so i have edited your code and try out this:-
$string="www.funnenjoy.com is best #SocialNetworking #website";
$text=preg_replace('/#(\\w+)/','$0',$string);
echo $text; // output will be www.funnenjoy.com is best #SocialNetworking #website