I have 2 arrrays, And i need return TRUE or FALSE when 2 arrays matched each other. also un-ordered arrays should return TRUE if results matched, but only should return true if both arrays have same values.
//This should return TRUE
$array_One = array('test1', 'test2', 'test3');
$array_Two = array('test1', 'test2', 'test3');
//This should return TRUE
$array_One = array('test1', 'test2', 'test3');
$array_Two = array('test1', 'test3', 'test2');
//This should return TRUE
$array_One = array('test1', 'test2', 'test3');
$array_Two = array('test1', 'test3', 'test2');
//This should return FALSE
$array_One = array('test1', 'test2', 'test3');
$array_Two = array('test1', 'test2');
I tried few methods, including array_key_exists by using foreach, But it does not returned the expected result. This should return ONLY one TRUE or FALSE when arrays matched.
array_diff()?