Given 2 associative arrays:
$fruits = array ( \"d\" => \"lemon\", \"a\" => \"orange\", \"b\" => \"banana\", \"c\" => \"apple\" );
$fruits2 = array
You don't need the ternary operator.
Also, be careful with count() as it will fail if your array is null.
They also need to be equal lengths or you'll get an error.
if( is_array($value1) && is_array($value2) && count($value1)==count($value2) ) {
for ( $i = 0; $i < count($value1); $i++)
{
$test[] = ($value1[$i] == $value2[$i]);
}
}