$arreglo= array("uno", "", "tres", "", "cinco"); for($i=0; $i<count($arreglo); $i++) if(!empty($arreglo[$i])) echo $arreglo[$i]."<br>";