Menu

#62 foreach($html->find(a[id=0]) as $e)

closed
None
2018-12-15
2010-11-18
No

Using the below code results in parsing all of the anchors on the given url

HTML:
foreach($html->find(a[id=0]) as $e)
echo $e->plaintext . '
';

...However, using

foreach($html->find(a[id=1]) as $e)
echo $e->plaintext . '
';

works perfectly...

It appears that if an ID="0" it will not function as intended. Is there a workaround for this?

Discussion

  • LogMANOriginal

    LogMANOriginal - 2018-12-15
    • status: open --> closed
    • assigned_to: S. C. Chen --> LogMANOriginal
     
  • LogMANOriginal

    LogMANOriginal - 2018-12-15

    Thanks for reporting this issue!
    It is fixed in [a72af2]

     

    Related

    Commit: [a72af2]


Log in to post a comment.

MongoDB Logo MongoDB