Фоторепортаж

$gal) $out[]= ' '.$gal[0].' '.$gal[0].' '; $out = array_chunk($out, ceil(count($out)/2)); $new = []; for($i=0; $i<=count($out[0]);$i++){ $new[] = $out[0][$i]; if(!empty($out[1][$i])) $new[]=$out[1][$i]; } $new = array_filter($new); $new = array_chunk($new,2); ?>