I need to check if all values in an array equal the same thing.
For example:
$allValues = array( \'true\', \'true\', \'true\', );
Also, you can condense goat's answer in the event it's not a binary:
if (count(array_unique($allvalues)) === 1 && end($allvalues) === 'true') { // ... }
to
if (array_unique($allvalues) === array('foobar')) { // all values in array are "foobar" }