$result = floor( $value );
$result = (int) $value;
$max = 133;
$arr1 = array();
$arr2 = array();
$per1 = array();
$per2 = array();
$i = 0;
while($i < 1000):
$rand = (int)rand(1, $max);
$a = (int)($rand / 5) * 5;
$b = $rand - $a;
$rand = $rand - $b;
$arr1[]= $rand;
$i++;
endwhile;
$i = 0;
while($i < 1000):
$arr2[] = round(rand(1,$max)/5)*5;
$i++;
endwhile;
foreach ($arr1 as $val)
if($val > $max) $per1[] = $val;
foreach ($arr2 as $val)
if($val > $max) $per2[] = $val;
echo '<pre>';
print_r($per1);
print_r($per2);
border: #fff solid 10px;
border-top-color: pink;
border-left-color: pink;
border-bottom-color: pink;
border: pink solid 10px;
border-right-color: #fff;
<div class="info_card">
<h1>%value:title%</h1>
<div>
<img src="%url:bank_img%" alt="Логотип банка: %value:bank_title%" title="Логотип банка: %value:bank_title%">
<ul>
<li><span class="param">%param:bank_title%</span><span class="value"><a href="%url:bank%">%value:bank_title%</a></span></li>
<li><span class="param">%param:ns_title%</span><span class="value">%value:ns_title%</span></li>
<li><span class="param">%param:avto%</span><span class="value">%value:avto%</span></li>
<li><span class="param">%param:strahov%</span><span class="value">%value:strahov%</span></li>
<li><span class="param">%param:period-rassm-min%</span><span class="value">%value:period-rassm-min%</span></li>
<li><span class="param">%param:period-rassm-max%</span><span class="value">%value:period-rassm-max%</span></li>
</ul>
</div>
<div>
<ul>
<li><span class="param">%param:avto-perviy-vznos-proc%</span><span class="value">%value:avto-perviy-vznos-proc%</span></li>
<li><span class="param">%param:summ-min%</span><span class="value">%value:summ-min%</span></li>
<li><span class="param">%param:summ-max%</span><span class="value">%value:summ-max%</span></li>
<li><span class="param">%param:stavka-min%</span><span class="value">%value:stavka-min%</span></li>
<li><span class="param">%param:stavka-max%</span><span class="value">%value:stavka-max%</span></li>
<li><span class="param">%param:period-min%</span><span class="value">%value:period-min%</span></li>
<li><span class="param">%param:period-max%</span><span class="value">%value:period-max%</span></li>
<li><span class="param">%param:commission-vidacha%</span><span class="value">%value:commission-vidacha%</span></li>
<li><span class="param">%param:commission-dosr%</span><span class="value">%value:commission-dosr%</span></li>
</ul>
</div>
<div class="full">
<ul>
<li><span class="param">%param:obesp%</span><span class="value">%value:obesp%</span></li>
<li><span class="param">%param:doc%</span><span class="value">%value:doc%</span></li>
<li><span class="param">%param:treb%</span><span class="value">%value:treb%</span></li>
</ul>
</div>
<div class="copy">
<p>%free:copy%</p>
</div>
</div>
function foo( $p , $i , $n, $percent = TRUE ){
if( ($i < 0 && $n >= 0) || ($i >=0 && $n < 0)) RETURN NULL;
if($percent) $i = $i/100;
$result = $p * pow((1 + $i ), $n);
RETURN $result;
}
b = p / (1-i)^n
b = p * (1 + (-i) )^(-n)
через функцию cfg() я получаю доступ к конфигу JSON вот таким образом:
cfg()->db->config->global('mydb_name')->host();
и устанавливаю глобальные настройки:
cfg()->status(404)->mode('www');
И это поверьте не криво :)