A
A
Alexander Ivanov2016-07-25 14:36:16
PHP
Alexander Ivanov, 2016-07-25 14:36:16

Why does PHP convert characters from uppercase to lowercase?

In Bitrix, in order for its ... additional properties to be displayed with capital letters UF_TIP_COMPANY[], otherwise saving does not occur.
Already made a multiple list capable of displaying checked and unchecked checkboxes.
Why does PHP convert characters from uppercase to lowercase?

global $USER;
        $usr = $USER->GetID();
        //$arFilter = array("ID" => $arEnum["ID"]);
        $arFilter = array("ID" => $usr);
        $arParams["SELECT"] = array("UF_TIP_COMPANY");
        $arRes = CUser::GetList($by,$desc,$arFilter,$arParams);
        if ($res = $arRes->Fetch()) {
          while($arEnum = $UF_TIP_COMPANY->GetNext()){
            $impParam = "name='UF_TIP_COMPANY[]'"; //обязательно только заглавные буквы
            echo "<label><input type='checkbox' value='".$arEnum["ID"]." ".ucfirst($impParam)." ";
            foreach ($res["UF_TIP_COMPANY"] as $idChecked) {
              $rsRes= CUserFieldEnum::GetList(array(), 
                array(
                  "ID" => $idChecked,
                )
              );
              if($arGender = $rsRes->GetNext()){
                if($arEnum["ID"]==$idChecked){
                  echo "checked";
                }
              }
            }
            echo " />".$arEnum["VALUE"]."</label><br />";
          }
        }

* amended

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ivanov, 2016-07-25
@cimonlebedev

there was a symbol missing in one place
'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question