<?php $count = [1,1,1,0,0,0,0,1,1,0,0]; $numOfCounts = count($count); for ($i = 0; $i < $numOfCounts; $i++) { if (0 == (int) $count[$i]) unset($count[$i]); } var_dump($count);
You have javascript disabled. You will not be able to edit any code.