Jump to content

question???


loudog

Recommended Posts

hey guy's. Im trying to write my own function for array_udiff_assoc.  So i need to compare two arrays in the same function and i was thinking that the best way would be to go element by element in other words compare each individual key to each other. for example compare key1 or array to  key one of array2.  My question is how can i compare each key of the  array to each other??  Does it make sense??

 

$a1=array(1=>"Dog",2=>"Cat",3=>"Horse");

$a2=array(1=>"Cat",2=>"Horse",3=>"Dog");

Link to comment
Share on other sites

that's a good idea but wouldn't that be cheating?? Im a newbie and i have a list of per set functions  that i want to rewrite. Im doing this cuz it will help me better understand and know that tool's i have to my disposal. Is there any other way??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.