Shortest way to evaluate an array with booleans (PHP)?
arrays, boolean, php
Solution
if (!in_array(false, $array)) { ...
Problem
I have an array with booleans in it, whats the shortest way to loop through it and get the final boolean expression? Example: array with 3 elems (true, false, true) --> the result should be false (true && false && true = false) I know I can loop through it, but is there a shorter way? Thanks!