Jump to content

Recommended Posts

Posted

Hello,

i need some support to realize this. I've two arrays. The one is an simple pgaeArray which i generate with $pages->find. The other is a little bit complicated. It's also an array but to get my values I have to loop an foreach because it's a part of a pagevar from my Array.

So Array 1 is an pagearray

and array two is only a foreach loop with values.

How to add this values to a new page array an then compare array one and array two?

I have to set urls if array 1 part of array to. If not then it should be only text.

Tnaks

Posted

$pa1 = $pages->find("something");

$a2 = array();

foreach(){…}

$pa2 = (new PageArray())->import($a2);

foreach($pa1->import($pa2)->unique() as $p){

if($pa2->has($p)) …

else …

}

  • Like 3

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
  • Recently Browsing   0 members

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