echo
не отрабатывает по условию $data=[
'name'=>'param1',
'categories'=>[
[
'name'=>'category1',
'value_1'=>'',
'value_2'=>'',
],
],
];
$resourses = [
'gold' => 1000,
'silver' => 100,
'bronze' => 1,
];
$coins = 120;
$result = [];
foreach ($resourses as $k => $v) {
$result[$k] = intdiv($coins, $v);
$coins -= $result[$k] * $v;
}
$result['coins'] = $coins;
print_r($result);
{include file='template.tpl' name=$var}
fetch
переменную