Firstly, sorry for my bad english
I've got a problem with comparing multidimensional array values
Here is my code that i want to solve:
$bla1 = array( array(0.1,0.5), array(0.1,0.5) )
$bla2 = array( array(0.5,0.1), array(0.5,0.1) )
$bla3 = array( array(0.1,0.5), array(0.5,0.1) )
if(check_every_single_values_in_array($bla1){
//Any command in here will not be executed / return false
}
if(check_every_single_values_in_array($bla2){
//Any command in here will not be executed / return false
}
if(check_every_single_values_in_array($bla3){
//Any command in here will not be executed / return false
}
Any type-juggling and different values will not execute any command.
Otherwise, if there is no any type-juggling and different values it will execute a command:
$bla4 = array( array(0.5,0.5), array(0.5,0.5) )
$bla5 = array( array(1,1), array(1,1) )
if(check_every_single_values_in_array($bla4){
//Any command in here will be executed / return true
}
if(check_every_single_values_in_array($bla5){
//Any command in here will be executed / return true
}
I've tried to solve it with array_diff or some logical and arithmetic operator
and none of them working
My question is, How to compare all values in multidimensional array? And what is the best, shortest, and fastest way code to solve it?