Как это сделать?
Например: от 100 до 500 евро
Код: Выделить всё
Result:
100€ - 200€
200€ - 300€
300€ - 400€
400€ - 500€
Код: Выделить всё
$start = 100;
$end = 500;
$step = 50;
foreach(range($start, $end, $step) as $i) {
if ($start < $i) {
echo ' - '.$i.'
';
}
switch ($i) {
default : echo $i;
}
if($end
Подробнее здесь: [url]https://stackoverflow.com/questions/56266200/spaced-price-listing-with-php[/url]
Мобильная версия