K
K
Kirill2016-11-30 16:22:11
PHP
Kirill, 2016-11-30 16:22:11

How to assign a value to an array element?

There is an array of data

$info[] = array(
        'id' => $row['id'],
        'first' => $row['first_name'],
        'second' => $row['second_name'],

How to make it possible to insert specific keys from array into this api and make them loop
$user = new CUser;
$arFields = Array(
  "NAME"              => "Сергей",
  "LAST_NAME"         => "Иванов",
  "EMAIL"             => "[email protected]",
  "LOGIN"             => "ivan",
  "LID"               => "ru",
  "ACTIVE"            => "Y",
  "GROUP_ID"          => array(10,11),
  "PASSWORD"          => "123456",
  "CONFIRM_PASSWORD"  => "123456",
  "PERSONAL_PHOTO"    => $arIMAGE
);

$ID = $user->Add($arFields);
if (intval($ID) > 0)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-11-30
@gangstarcj

Usual foreach
What is impossible that?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question