check if everything in a list is equal php code example
Example: check if all values in array are equal php
if(count(array_unique($array)) === 1) {
// all values in $array are the same
} else {
// at least 1 value in $array is different
}
if(count(array_unique($array)) === 1) {
// all values in $array are the same
} else {
// at least 1 value in $array is different
}