<?php
$total = 30;
$m = 4;
$skip = 4;
for ($i = 1; $i <= $total; $i++) {
$newArray[$i] = $i;
}
echo "<pre>";
echo "</pre>";
$count = count($newArray);
for ($k = 1; $k <= $count - $m; $k++) {
for ($i = 1; $i < $skip; $i++) {
if (!isset($newArray[$d])) { $z = $skip - $i - 1; //2
for ($s = 1; $s < $z; $s++) {
}
}
}
}
echo "<pre>";
echo "</pre>";
PD9waHAKJG5ld0FycmF5ID0gYXJyYXkoKTsKJHRvdGFsICAgID0gMzA7CiRtICAgICAgICA9IDQ7CiRza2lwICAgICA9IDQ7CmZvciAoJGkgPSAxOyAkaSA8PSAkdG90YWw7ICRpKyspIHsKICAgICRuZXdBcnJheVskaV0gPSAkaTsKfQp1bnNldCgkaSk7CmVjaG8gIjxwcmU+IjsKcHJpbnRfcigkbmV3QXJyYXkpOwplY2hvICI8L3ByZT4iOwokY291bnQgPSBjb3VudCgkbmV3QXJyYXkpOwoKCgoKZm9yICgkayA9IDE7ICRrIDw9ICRjb3VudCAtICRtOyAkaysrKSB7CiAgICAKICAgIGZvciAoJGkgPSAxOyAkaSA8ICRza2lwOyAkaSsrKSB7CiAgICAgICAgbmV4dCgkbmV3QXJyYXkpOwogICAgICAgICRkID0gY3VycmVudCgkbmV3QXJyYXkpOwogICAgICAgIAogICAgICAgIGlmICghaXNzZXQoJG5ld0FycmF5WyRkXSkpIHsKICAgICAgICAgICAgJHogPSAkc2tpcCAtICRpIC0gMTsgLy8yCiAgICAgICAgICAgIAogICAgICAgICAgICByZXNldCgkbmV3QXJyYXkpOwogICAgICAgICAgICAKICAgICAgICAgICAgCiAgICAgICAgICAgIGZvciAoJHMgPSAxOyAkcyA8ICR6OyAkcysrKSB7CiAgICAgICAgICAgICAgICBuZXh0KCRuZXdBcnJheSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgJGQgPSBjdXJyZW50KCRuZXdBcnJheSk7CiAgICAgICAgfQogICAgfQogICAgCiAgICB1bnNldCgkbmV3QXJyYXlbJGRdKTsKICAgIAogICAgCn0KCgplY2hvICI8cHJlPiI7CnByaW50X3IoJG5ld0FycmF5KTsKZWNobyAiPC9wcmU+IjsK