Jump to content

Remove multiple items from PageArray


Robin S
 Share

Recommended Posts

Thanks for the replies.

@elabx: Yeah, I'm already doing a similar workaround using the ->not method.

$page_array_1 = $pages->find(selector_1);
// do some stuff with $page_array_1
$page_array_2 = $pages->find(selector_2);
// do some stuff with $page_array_2
// then to subtract $page_array_1 from $page_array_2...
$page_array_2->not(selector_1);

But it seems wrong to have to use the same selector again when you already have the PageArray you want to remove. I figured there has to be a better way...

...and there is, but it's not in the docs or cheatsheet. Thanks BitPoet.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...