<?
//$_SERVER["DOCUMENT_ROOT"] = __DIR__;
define('STOP_STATISTICS', true);
define('NO_KEEP_STATISTIC', 'Y');
define('NO_AGENT_STATISTIC', 'Y');
define('DisableEventsCheck', true);
define('BX_SECURITY_SHOW_MESSAGE', true);
define('NOT_CHECK_PERMISSIONS', true);

$_SERVER['DOCUMENT_ROOT'] = dirname(__DIR__, 1);
require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); 
CModule::IncludeModule('iblock');

$car = [
	"uid" => 4, 
	"price" => 4, 
	"programms" => [
		"lkt"
	], 
];

$name = "some ".$car['uid'];
$code = CUtil::translit( $name, "ru", [ "max_len" => 255, "change_case" => "L", "replace_space" => "-", "replace_other" => "-", ] );

$PROPERTY_VALUES = [
	"UID" => $car['uid'], 
	"PRICE" => $car['price'], 
	"LEASING_PROGRAMS" => [ "lkt" ], 
];

//foreach($car['programms'] AS $p)
//{
//$PROPERTY_VALUES["LEASING_PROGRAMS"][] = ["VALUE" => $p];
//}

print_r($PROPERTY_VALUES);

$car_element = new CIBlockElement;
$car_payload = [ "IBLOCK_SECTION_ID" => false, "IBLOCK_ID" => 1, "NAME" => $name, "CODE" => $code, "PROPERTY_VALUES" => $PROPERTY_VALUES, "ACTIVE" => "Y", ];
$car_element->Add($car_payload);

die();


?>