PHP implose sans nul

implode('-', array_filter($array));
Helpful Hawk