if values are the same with the values in a list do something php code example
Example 1: 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
}
Example 2: php check if all array values are the same
// All values are equal
if (count(array_unique($allvalues)) === 1 && end($allvalues) === 'true') {
}
// Check the thing you don't want
if (in_array('false', $allvalues, true)) {
}