I’m grabbing a list of tags used on a post with the $posttags array. In this there’s a special tag that I want to store separately: profile-somename.
How do I:
- Find this special
profile-somenametag from the list (The value afterprofile-is dynamic, keeps changing,somenameis just an example) - Strip
profile-from it and - Store in a separate variable?
Many thanks for your help.
like
ok, it turns out we have array of objects. preg_grep won’t work with it, so you have to loop