const end = current + 1;
if (current < 2) {
end += 2 - current;
}
Присвоение константе - этого JS уже не прощает...function TableYchastki() {
let n = ChisloYchastkov.value, h=1+Math.floor(Math.log10(n));
div1.style.display = "block";
for (let i = 1; i <= n; i++) {
div1.innerHTML = div1.innerHTML + "Площадь повреждённой территории на " +
(" ".repeat(h) + i).slice (-h).replace(/\s/g," ") +
" участке: <input type=text id='ploshad" + i + "'><br>";
}
}
$results_file='results.php';
$result=include_once($results_file);
$result[$current_user_id]=['post'=>$_POST, 'time'=>time()];
file_put_contents($results_file, '<'."?php\nreturn ".var_export($result,true).';')
<?php
return [];