0

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

Edited by Exploded Fiber: n/a

2
Contributors
2
Replies
5
Views
7 Years
Discussion Span
Last Post by Exploded Fiber
0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.