$items = [];
foreach ($arResult["ITEMS"] as $item) {
$items[$item['DISPLAY_PROPERTIES']['DATA_SOBYTIYA']['VALUE']][] = $item;
}
Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.php.net/manual/en/function.curl-exec.php
NULL is returned if the json cannot be decoded or if the encoded data is deeper than the recursion limit.
Так как лучше?Лучше мыслить не функциями и файлами, а приложением и его жизненным циклом. Тогда у вас будут подключаемые через автозагрузку классы и библиотеки и одна точка входа, в которой инициализируется приложение.
var_dump($value2);
и убедитесь в этом.<input type="text" name="items[0][url]" /><input type="text" name="items[0][title]" />
<input type="text" name="items[1][url]" /><input type="text" name="items[1][title]" />
<input type="text" name="items[2][url]" /><input type="text" name="items[2][title]" />
$text = "foo\nbar\nfoobar";
$textlines = explode("\n", $text);
$textrun = $section->addTextRun();
$textrun->addText(array_shift($textlines));
foreach($textlines as $line) {
$textrun->addTextBreak();
// maybe twice if you want to seperate the text
// $textrun->addTextBreak(2);
$textrun->addText($line);
}