troubleshooting Question

Extracting content from meta tag PHP MYHTML DOM

Avatar of weekapaug
weekapaug asked on
PHPHTML* DOM
3 Comments1 Solution116 ViewsLast Modified:
There is a meta tag I need to isolate and extract data from and it looks like this.  The selector description has a colon in it and I'm not sure if this an issue or its just my syntax.  I tried to get around it with a wildcard search but it did nothing either.

<meta name="somefield:withColons" content="I need whats here in plain text">

I have tried a few things that I'm showing below but can not get the value to show up.  I get no errors either on some, just nothing but I know its there...

NOTHING BELOW HERE WORKS FOR ME
$myVar=$html->find("meta[name='somefield:withColons']")->content;
$myVar=$html->find(meta[name*=somefield)->content;
$myVar=$html->find("meta[name='somefield:withColons']")->plaintext;
$myVar=$html->find(meta[name*=somefield)->plaintextt;
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros