Hey guys so I have a question,
Lets say someone puts "Hi lets have #fun and than more #fun"
Now lets say I want to grab the second hashtag including the word connected to it and store it into a variable.
How would I go about getting the second part because using (strpos($a,'#fun')
would only return the first one.
Thank you for your time!
David
Edit:
Here's what I did:
$code = "Hi lets have #funfgs and than more #funny";
$pos1 = strpos($code, '#');
$pos2 = strpos($code, '#', $pos1 + strlen('#'));
echo substr($code, $pos2);