weekapaug
asked on
Extracting content from meta tag PHP MYHTML DOM
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.
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...
<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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help!
ASKER
($meta_element->attr['cont