I need to check if all values in an array equal the same thing.
For example:
$allValues = array( \'true\', \'true\', \'true\', );
Why not just compare count after calling array_unique()?
array_unique()
To check if all elements in an array are the same, should be as simple as:
$allValuesAreTheSame = (count(array_unique($allvalues)) === 1);
This should work regardless of the type of values in the array.