U
U
user32019-10-24 14:13:53
1C-Bitrix
user3, 2019-10-24 14:13:53

How to pass function value to tag?

Greetings, there is such a question - you need to pass the value value to the place where I just stupidly wrote echo $value. Can you please tell me how can I do this so that the number is displayed?

<p class="limitorder">Предупреждение!<br>Ваш дневной лимит заказа <? echo $value?></p>
                      <?

    if ($USER->IsAuthorized())
    {
      $rsUser = CUser::GetByID($USER->GetID());
      $arUser = $rsUser->Fetch();

      if(isset($arUser['UF_LIMIT']) and $arUser['UF_LIMIT']!='' and $arUser['UF_LIMIT']!=0)
        {?>

          <input type="visible" name="order[<?=$timesec?>][LIMIT]" id1="limit" value="<?=$arUser['UF_LIMIT']?>">

          <?
        }
        else
        {
          ?><input type="visible" name="order[<?=$timesec?>][LIMIT]" id1="limit" value="0"><?
        }
      }
      else
      {
        ?><input type="visible" name="order[<?=$timesec?>][LIMIT]" id1="limit" value="0"><?
      }
      ?>

UPD
If we put it in the <? echo ['UF_LIMIT']?>, we get5db18b67cf768051921994.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-10-24
Madzhugin @Suntechnic

Your $value is an array, so you can't just echo it.
Do print_r($value) and look in which key you need the value. Then
<?=$value['KEY']?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question