Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpQuery eq(-2) #11

Open
aesnnov opened this issue Apr 20, 2017 · 2 comments
Open

phpQuery eq(-2) #11

aesnnov opened this issue Apr 20, 2017 · 2 comments

Comments

@aesnnov
Copy link

aesnnov commented Apr 20, 2017

dont work selector with minus..
phpQuery eq(-2)
example: echo $html->find('div.bx_pagination_page > ul > li > a:eq(-2)')->html();

2017-04-20_110204

@aesnnov
Copy link
Author

aesnnov commented Apr 20, 2017

Fix it

if($k<0) { $this->elements = array( $this->elements[count($this->elements)+$k] ); } else { $this->elements = isset( $this->elements[$k] ) ? array( $this->elements[$k] ) : array(); }

@aesnnov
Copy link
Author

aesnnov commented Apr 20, 2017

2017-04-20_114613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant