$arFiles = array();
for($i = 0; $i < count($_FILES["photo_ar"]['name']); $i++)
{
if($_FILES["photo_ar"]['tmp_name'][$i])
$arFiles[] = array('VALUE' => CFile::MakeFileArray($_FILES["photo_ar"]['tmp_name'][$i]), 'DESCRIPTION' => '');
}
$arFields = array(
"IBLOCK_ID" => 7,
"NAME" => $head,
"PROPERTY_VALUES" => array("PHOTO" => $arFiles)
);
$oElement = new CIBlockElement();
$idElement = $oElement->Add($arFields, false, false, true);
$file = Array
(
'name' => $_FILES["photo_ar"]['name'][$i],
'size' => $_FILES["photo_ar"]['size'][$i],
'tmp_name' => $_FILES["photo_ar"]['tmp_name'][$i],
'type' => $_FILES["photo_ar"]['type'][$i]
);
$arFiles[] = array('VALUE' => $file, 'DESCRIPTION' => '');