Can you give example on how to use attribute.
For instance, I have:
Updated: 11:33 pm (33 mins ago)
Updated: 11:32 pm (34 mins ago)
I want to get only the time but this does not work:
foreach($aLine->find('p[*=datetime]') as $stationTime){
$updateTime[]=$stationTime->plaintext . '
';
}
This also does not work (but this format is what you write in documentation):
foreach($aLine->find('p*=datetime') as $stationTime){
$updateTime[]=$stationTime->plaintext . '
';
}
Thanks
Closing because this is an old topic which is probably of no importance today. Please don't hesitate to open a new ticket for further discussion.
That said, your examples above need to be adjusted slightly to make them work:
The difference is simply in how the attribute is defined. The parser needs to know which attribute to look at:
'p[*="datetime"]'
'p[id*="datetime"]'