I have an array of values that can be DISABLED or ENABLED, so I want to know how many are there ENABLED. Here is a piece of code:
$list = array(
$variable1,
$variable2,
$variable3,
$variable4
);
$count = count($list);
Thanks for any reply.
UPDATE: the values are NOT true and or false but ENABLE / DISABLE. Do your answers apply in this case? Thanks again.
If the only valid options are boolean TRUE and FALSE, then
EDIT
with ‘ENABLE’ and ‘DISABLE’ as the possible values: