How to assign array element is its value?

There is an array of data
$info[] = array(
 'id' => $row['id'],
 'first' => $row['first_name'],
 'second' => $row['second_name'],

How to do to be able to insert certain keys from an array in the api and make them cycle

$user = new CUser;
$arFields = Array(
 "NAME" => "Sergei",
 "LAST_NAME" => "Ivanov",
 "EMAIL" => "ivanov@microsoft.com",
 "LOGIN" => "ivan",
 "LID" => "EN",
 "ACTIVE" => "Y",
 "GROUP_ID" => array(10,11),
 "PASSWORD" => "123456",
 "CONFIRM_PASSWORD" => "123456",
 "PERSONAL_PHOTO" => $arIMAGE
);

$ID = $user->Add($arFields);
if (intval($ID) > 0)
July 2nd 19 at 13:08
1 answer
July 2nd 19 at 13:10
Regular foreach
What can't you do that?
what the foreach, what I did didn't work, can give an example? - Otto_Satterfield89 commented on July 2nd 19 at 13:13
: php.net/manual/ru/control-structures.foreach.php there's plenty of examples - Mabel commented on July 2nd 19 at 13:16

Find more questions by tags PHP1C-Bitrix