Skip to content

Instantly share code, notes, and snippets.

@nfort
Created December 17, 2015 07:02
Show Gist options
  • Save nfort/681510150da8f19f0052 to your computer and use it in GitHub Desktop.
Save nfort/681510150da8f19f0052 to your computer and use it in GitHub Desktop.
Moscow metro
<?
$metro_list = ["94" => ["metro_id" => 94, "metro_name" => "Авиамоторная"],
"130" => ["metro_id" => 130, "metro_name" => "Автозаводская"],
"182" => ["metro_id" => 182, "metro_name" => "Академическая"],
"325" => ["metro_id" => 325, "metro_name" => "Александровский сад"],
"65" => ["metro_id" => 65, "metro_name" => "Алексеевская"],
"138" => ["metro_id" => 138, "metro_name" => "Алма-Атинская"],
"50" => ["metro_id" => 50, "metro_name" => "Алтуфьево"],
"159" => ["metro_id" => 159, "metro_name" => "Аннино"],
"322" => ["metro_id" => 322, "metro_name" => "Арбатская(c)"],
"323" => ["metro_id" => 323, "metro_name" => "Арбатская(г)"],
"44" => ["metro_id" => 44, "metro_name" => "Аэропорт"],
"61" => ["metro_id" => 61, "metro_name" => "Бабушкинская"],
"22" => ["metro_id" => 22, "metro_name" => "Багратионовская"],
"300" => ["metro_id" => 300, "metro_name" => "Баррикадная"],
"86" => ["metro_id" => 86, "metro_name" => "Бауманская"],
"37" => ["metro_id" => 37, "metro_name" => "Беговая"],
"302" => ["metro_id" => 302, "metro_name" => "Белорусская"],
"186" => ["metro_id" => 186, "metro_name" => "Беляево"],
"51" => ["metro_id" => 51, "metro_name" => "Бибирево"],
"327" => ["metro_id" => 327, "metro_name" => "Библиотека им.Ленина"],
"170" => ["metro_id" => 170, "metro_name" => "Битцевский парк"],
"119" => ["metro_id" => 119, "metro_name" => "Борисово"],
"337" => ["metro_id" => 337, "metro_name" => "Боровицкая"],
"63" => ["metro_id" => 63, "metro_name" => "Ботанический сад"],
"117" => ["metro_id" => 117, "metro_name" => "Братиславская"],
"174" => ["metro_id" => 174, "metro_name" => "Бульвар Адм.Ушакова"],
"160" => ["metro_id" => 160, "metro_name" => "Бульвар Дм.Донского"],
"176" => ["metro_id" => 176, "metro_name" => "Бунинская аллея"],
"64" => ["metro_id" => 64, "metro_name" => "ВДНХ"],
"140" => ["metro_id" => 140, "metro_name" => "Варшавская"],
"53" => ["metro_id" => 53, "metro_name" => "Владыкино"],
"41" => ["metro_id" => 41, "metro_name" => "Водный стадион"],
"42" => ["metro_id" => 42, "metro_name" => "Войковская"],
"101" => ["metro_id" => 101, "metro_name" => "Волгоградский пр-т"],
"115" => ["metro_id" => 115, "metro_name" => "Волжская"],
"12" => ["metro_id" => 12, "metro_name" => "Волоколамская"],
"202" => ["metro_id" => 202, "metro_name" => "Воробьевы горы"],
"27" => ["metro_id" => 27, "metro_name" => "Выставочная"],
"105" => ["metro_id" => 105, "metro_name" => "Выхино"],
"28" => ["metro_id" => 28, "metro_name" => "Деловой центр"],
"45" => ["metro_id" => 45, "metro_name" => "Динамо"],
"56" => ["metro_id" => 56, "metro_name" => "Дмитровская"],
"311" => ["metro_id" => 311, "metro_name" => "Добрынинская"],
"136" => ["metro_id" => 136, "metro_name" => "Домодедовская"],
"208" => ["metro_id" => 208, "metro_name" => "Достоевская"],
"112" => ["metro_id" => 112, "metro_name" => "Дубровка"],
"121" => ["metro_id" => 121, "metro_name" => "Зябликово"],
"82" => ["metro_id" => 82, "metro_name" => "Измайловская"],
"185" => ["metro_id" => 185, "metro_name" => "Калужская"],
"133" => ["metro_id" => 133, "metro_name" => "Кантемировская"],
"141" => ["metro_id" => 141, "metro_name" => "Каховская"],
"132" => ["metro_id" => 132, "metro_name" => "Каширская"],
"315" => ["metro_id" => 315, "metro_name" => "Киевская"],
"330" => ["metro_id" => 330, "metro_name" => "Китай-город"],
"113" => ["metro_id" => 113, "metro_name" => "Кожуховская"],
"131" => ["metro_id" => 131, "metro_name" => "Коломенская"],
"305" => ["metro_id" => 305, "metro_name" => "Комсомольская"],
"187" => ["metro_id" => 187, "metro_name" => "Коньково"],
"137" => ["metro_id" => 137, "metro_name" => "Красногвардейская"],
"316" => ["metro_id" => 316, "metro_name" => "Краснопресненская"],
"74" => ["metro_id" => 74, "metro_name" => "Красносельская"],
"344" => ["metro_id" => 344, "metro_name" => "Красные ворота"],
"111" => ["metro_id" => 111, "metro_name" => "Крестьянская застава"],
"326" => ["metro_id" => 326, "metro_name" => "Кропоткинская"],
"15" => ["metro_id" => 15, "metro_name" => "Крылатское"],
"329" => ["metro_id" => 329, "metro_name" => "Кузнецкий мост"],
"103" => ["metro_id" => 103, "metro_name" => "Кузьминки"],
"17" => ["metro_id" => 17, "metro_name" => "Кунцевская"],
"306" => ["metro_id" => 306, "metro_name" => "Курская"],
"24" => ["metro_id" => 24, "metro_name" => "Кутузовская"],
"181" => ["metro_id" => 181, "metro_name" => "Ленинский пр-т"],
"106" => ["metro_id" => 106, "metro_name" => "Лермонтовский пр-т"],
"171" => ["metro_id" => 171, "metro_name" => "Лесопарковая"],
"346" => ["metro_id" => 346, "metro_name" => "Лубянка"],
"116" => ["metro_id" => 116, "metro_name" => "Люблино"],
"308" => ["metro_id" => 308, "metro_name" => "Марксистская"],
"207" => ["metro_id" => 207, "metro_name" => "Марьина роща"],
"118" => ["metro_id" => 118, "metro_name" => "Марьино"],
"331" => ["metro_id" => 331, "metro_name" => "Маяковская"],
"60" => ["metro_id" => 60, "metro_name" => "Медведково"],
"26" => ["metro_id" => 26, "metro_name" => "Международная"],
"301" => ["metro_id" => 301, "metro_name" => "Менделеевская"],
"11" => ["metro_id" => 11, "metro_name" => "Митино"],
"16" => ["metro_id" => 16, "metro_name" => "Молодежная"],
"13" => ["metro_id" => 13, "metro_name" => "Мякинино"],
"151" => ["metro_id" => 151, "metro_name" => "Нагатинская"],
"152" => ["metro_id" => 152, "metro_name" => "Нагорная"],
"153" => ["metro_id" => 153, "metro_name" => "Нахимовский пр-т"],
"91" => ["metro_id" => 91, "metro_name" => "Новогиреево"],
"90" => ["metro_id" => 90, "metro_name" => "Новокосино"],
"334" => ["metro_id" => 334, "metro_name" => "Новокузнецкая"],
"303" => ["metro_id" => 303, "metro_name" => "Новослободская"],
"190" => ["metro_id" => 190, "metro_name" => "Новоясеневская"],
"184" => ["metro_id" => 184, "metro_name" => "Новые Черемушки"],
"313" => ["metro_id" => 313, "metro_name" => "Октябрьская"],
"35" => ["metro_id" => 35, "metro_name" => "Октябрьское поле"],
"135" => ["metro_id" => 135, "metro_name" => "Орехово"],
"52" => ["metro_id" => 52, "metro_name" => "Отрадное"],
"347" => ["metro_id" => 347, "metro_name" => "Охотный ряд"],
"310" => ["metro_id" => 310, "metro_name" => "Павелецкая"],
"314" => ["metro_id" => 314, "metro_name" => "Парк культуры"],
"19" => ["metro_id" => 19, "metro_name" => "Парк победы"],
"83" => ["metro_id" => 83, "metro_name" => "Партизанская"],
"81" => ["metro_id" => 81, "metro_name" => "Первомайская"],
"92" => ["metro_id" => 92, "metro_name" => "Перово"],
"54" => ["metro_id" => 54, "metro_name" => "Петровско-разумовская"],
"114" => ["metro_id" => 114, "metro_name" => "Печатники"],
"20" => ["metro_id" => 20, "metro_name" => "Пионерская"],
"30" => ["metro_id" => 30, "metro_name" => "Планерная"],
"95" => ["metro_id" => 95, "metro_name" => "Площадь Ильича"],
"324" => ["metro_id" => 324, "metro_name" => "Площадь Революции"],
"36" => ["metro_id" => 36, "metro_name" => "Полежаевская"],
"338" => ["metro_id" => 338, "metro_name" => "Полянка"],
"204" => ["metro_id" => 204, "metro_name" => "Пр-т Вернадского"],
"157" => ["metro_id" => 157, "metro_name" => "Пражская"],
"72" => ["metro_id" => 72, "metro_name" => "Преображенская пл."],
"100" => ["metro_id" => 100, "metro_name" => "Пролетарская"],
"304" => ["metro_id" => 304, "metro_name" => "Проспект Мира"],
"183" => ["metro_id" => 183, "metro_name" => "Профсоюзная"],
"328" => ["metro_id" => 328, "metro_name" => "Пушкинская"],
"10" => ["metro_id" => 10, "metro_name" => "Пятницкое шоссе"],
"40" => ["metro_id" => 40, "metro_name" => "Речной вокзал"],
"66" => ["metro_id" => 66, "metro_name" => "Рижская"],
"110" => ["metro_id" => 110, "metro_name" => "Римская"],
"104" => ["metro_id" => 104, "metro_name" => "Рязанский проспект"],
"57" => ["metro_id" => 57, "metro_name" => "Савеловская"],
"62" => ["metro_id" => 62, "metro_name" => "Свиблово"],
"154" => ["metro_id" => 154, "metro_name" => "Севастопольская"],
"84" => ["metro_id" => 84, "metro_name" => "Семеновская"],
"312" => ["metro_id" => 312, "metro_name" => "Серпуховская"],
"18" => ["metro_id" => 18, "metro_name" => "Славянский бульвар"],
"321" => ["metro_id" => 321, "metro_name" => "Смоленская(г)"],
"320" => ["metro_id" => 320, "metro_name" => "Смоленская(с)"],
"43" => ["metro_id" => 43, "metro_name" => "Сокол"],
"73" => ["metro_id" => 73, "metro_name" => "Сокольники"],
"33" => ["metro_id" => 33, "metro_name" => "Спартак"],
"201" => ["metro_id" => 201, "metro_name" => "Спортивная"],
"340" => ["metro_id" => 340, "metro_name" => "Сретенский бульвар"],
"14" => ["metro_id" => 14, "metro_name" => "Строгино"],
"25" => ["metro_id" => 25, "metro_name" => "Студенческая"],
"341" => ["metro_id" => 341, "metro_name" => "Сухаревская"],
"31" => ["metro_id" => 31, "metro_name" => "Сходненская"],
"309" => ["metro_id" => 309, "metro_name" => "Таганская"],
"332" => ["metro_id" => 332, "metro_name" => "Тверская"],
"333" => ["metro_id" => 333, "metro_name" => "Театральная"],
"102" => ["metro_id" => 102, "metro_name" => "Текстильщики"],
"188" => ["metro_id" => 188, "metro_name" => "Теплый стан"],
"55" => ["metro_id" => 55, "metro_name" => "Тимирязевская"],
"343" => ["metro_id" => 343, "metro_name" => "Третьяковская"],
"206" => ["metro_id" => 206, "metro_name" => "Тропарёво"],
"339" => ["metro_id" => 339, "metro_name" => "Трубная"],
"150" => ["metro_id" => 150, "metro_name" => "Тульская"],
"342" => ["metro_id" => 342, "metro_name" => "Тургеневская"],
"32" => ["metro_id" => 32, "metro_name" => "Тушинская"],
"158" => ["metro_id" => 158, "metro_name" => "Ул.Ак.Янгеля"],
"172" => ["metro_id" => 172, "metro_name" => "Ул.Старокачаловская"],
"38" => ["metro_id" => 38, "metro_name" => "Улица 1905 года"],
"175" => ["metro_id" => 175, "metro_name" => "Улица Горчакова"],
"70" => ["metro_id" => 70, "metro_name" => "Улица Подбельского"],
"173" => ["metro_id" => 173, "metro_name" => "Улица Скобелевская"],
"203" => ["metro_id" => 203, "metro_name" => "Университет"],
"21" => ["metro_id" => 21, "metro_name" => "Филевский парк"],
"23" => ["metro_id" => 23, "metro_name" => "Фили"],
"200" => ["metro_id" => 200, "metro_name" => "Фрунзенская"],
"134" => ["metro_id" => 134, "metro_name" => "Царицино"],
"335" => ["metro_id" => 335, "metro_name" => "Цветной бульвар"],
"71" => ["metro_id" => 71, "metro_name" => "Черкизовская"],
"155" => ["metro_id" => 155, "metro_name" => "Чертановская"],
"336" => ["metro_id" => 336, "metro_name" => "Чеховская"],
"345" => ["metro_id" => 345, "metro_name" => "Чистые пруды"],
"307" => ["metro_id" => 307, "metro_name" => "Чкаловская"],
"180" => ["metro_id" => 180, "metro_name" => "Шаболовская"],
"120" => ["metro_id" => 120, "metro_name" => "Шипиловская"],
"93" => ["metro_id" => 93, "metro_name" => "Шоссе Энтузиастов"],
"80" => ["metro_id" => 80, "metro_name" => "Щелковская"],
"34" => ["metro_id" => 34, "metro_name" => "Щукинская"],
"85" => ["metro_id" => 85, "metro_name" => "Электрозаводская"],
"205" => ["metro_id" => 205, "metro_name" => "Юго-Западная"],
"156" => ["metro_id" => 156, "metro_name" => "Южная"],
"189" => ["metro_id" => 189, "metro_name" => "Ясенево"]
];
$arFields = Array(
"NAME" => "Метро",
"ACTIVE" => "Y",
"SORT" => "100",
"CODE" => "METRO",
"PROPERTY_TYPE" => "L",
// Тут укажи ID ИБ
"IBLOCK_ID" => 11
);
foreach ($metro_list as $index => $value) {
$arFields["VALUES"][$value['metro_id']] = Array(
"VALUE" => $value['metro_name'],
"DEF" => "N",
"SORT" => $value['metro_id']
);
}
$ibp = new CIBlockProperty;
$PropID = $ibp->Add($arFields);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment