I am looking to get the tag of a specific element in php, and I think I can do that through preg_match, but I am not sure.
Essentially I have something like:
<label>Some Jazz</label>
What I would like to do is:
if tag = label then do something, else do something else.
The problem is getting the label part from the html tag. I did how ever find this answer. How ever your thoughts are welcome.
I failed to mention I do not want the "some jazz" I want to see if the tag is a label or not. - this is in reference to some answers where it gets me whats between the tags and not the tag it's self.