You are on the right track... Just need to clean up some syntax.
$array1 = array("Hello", "World");
$array2 = array("Hello", "World!");
If($array1 == $array2){
echo "They are equal!";
} else {
echo "They are not equal!";
}
$array1 = array("Hello", "World");
$array2 = array("World", "Hello");
If($array1 == $array2){
echo "They are equal!";
} else {
echo "They are not equal!";
}
Keep in mind, they need to match exactly. That includes case, punctuation and the order of the indices.
Examples:
$array1 = array("Hello", "World");
$array2 = array("Hello", "world");
(Not Equal)
$array1 = array("Hello", "World");
$array2 = array("Hello", "World!");
(Not Equal)
$array1 = array("Hello", "World");
$array2 = array("World", "Hello");
(Not Equal)
$array1 = array("Hello", "World");
$array2 = array("World", "Hello");
sort($array1);
sort($array2);
(Equal)
Make Sense?