<?php $foo = [true, false, true]; $bar = ['joe', 'paul', 'steve']; $result = array_intersect_keys($bar, array_filter($foo)); var_dump($result);
You have javascript disabled. You will not be able to edit any code.