Answer the question
In order to leave comments, you need to log in
How to fix Cannot redeclare SopduPercent() error?
debug says that the error is in this file
<?php
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
function SopduPercent($Curse, $Percent){
if(ctype_digit($Percent) || $Percent !== 0){
$Summ = ($Curse/100*$Percent)+$Curse;
} else {
$Summ = $Curse;
}
$data = sprintf("%01.2f", $Summ);
return $data;
}
include_once ('currency.php');
foreach ($arParams["ChoiceCurrency"] as $Params){
$arResult[$currency[$Params]["ncode"]] = array(
"code" => $Params,
"course" => SopduPercent($currency[$Params]["money"], $arParams["ChoicePercent"]),
"name" => $currency[$Params]["name"],
"num_code" => $currency[$Params]["ncode"],
"unit" => $currency[$Params]["unit"]
);
}
$this->IncludeComponentTemplate();
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question