$d) { $count += $d * $a; }else{ $count += $d & $a; } } echo $count;