Reputation: 5087
I need to find an html input that is in an html commented section
<!-- <input type="hidden" name="ab_cde" value="12345" /> -->
the code
foreach($html->find('input') as $element)
{
}
is not working to find it. How can it be done?
Upvotes: 0
Views: 185
Reputation: 372
you can do via $html->find('comment')
and then use an regular expression for your input in there or initialize the comments content as another html object (http://php.net/manual/en/domdocument.loadhtml.php) to be searched like you tried before.
Upvotes: 1