Hey Guys and Gals,

I have an array:
Array ( [Small] => Array ( [0] => 4 [1] => 5 [2] => 3 ) [Butters] => Array ( [0] => 5 [1] => 2 [2] => 5 ) [black] => Array ( [0] => 3 [1] => 5 [2] => 4 ) )

*** edit: These values are ints

I'd like some advice on how to compare the values in each array such as

Array ( [Small] => Array ( [0] =>4 [1] => 5 [2] => 3 ) [Butters] => Array ( [0] => 5 [1] => 2 [2] => 5 ) [black] => Array ( [0] => 3 [1] => 5 [2] => 4 ) )

I was considering using somthing like creating an array in a for loop and using a foreach for the created array.:

for($i= 0; $i < $numberofseats; $i++){
$temp= array(); 
		   foreach($newvaluearray as $round){
			array_push($temp, $round[$i]);
		       }

If anyone can offer some advise on an efficient method I'd welcome some advise.

I'm still pretty new to php so I'm not sure if there is a function available with php that may best be used here.
Many Thanks

Recommended Answers

All 2 Replies

Thanks for the reply.
I am unfamilar with
# array_ diff_ uassoc
# array_ diff_ ukey
I think thought they may offer the solution needed.

Thanks again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.