Как мне получить указанный c элемент из следующего массива. Я хочу получить близкие значения.
Что мне делать в этом случае?
$ data = json_decode (file_get_contents ($ req_url), true);
// print_r ($ data); // передаем следующий массив;
// Массив ([диаграмма] => Массив ([результат] => Массив ([0] => Массив ([meta] => Массив ([валюта] => USD [символ] => SEAS [exchangeName] => NYQ [instrumentType] => EQUITY [firstTradeDate] => 1366378200 [regularMarketTime] => 1588622401 [gmtoffset] => -14400 [часовой пояс] => EDT [exchangeTimezoneName] => America / New_York [regularMarketPrice] => 14.55 [chartPreviousClose] => 14.11 [previousClose] => 14.11 [scale] => 3 [priceHint] => 2 [currentTradingPeriod] => Array ([pre] => Array ([timezone] = > EDT [end] => 1588599000 [start] => 1588579200 [gmtoffset] => -14400) [regular] => Array ([timezone] => EDT [end] => 1588622400 [start] => 1588599000 [gmtoffset] => -14400) [сообщение] => Массив ([часовой пояс] => EDT [end] => 1588636800 [начало] => 1588622400 [gmtoffset] => -14400)) [tradingPeriods] => Массив ([0] = > Массив ([0] => Массив ([часовой пояс] => EDT [end] => 1588622400 [начало] => 1588599000 [gmtoffset] => -14400))) [dataGranularity] => 5 мин [диапазон] => 1 день [v alidRanges] => Array ([0] => 1d [1] => 5d [2] => 1mo [3] => 3mo [4] => 6mo [5] => 1y [6] => 2y [7] ] => 5y [8] => 10y [9] => ytd [10] => max)) [timestamp] => Array ([0] => 1588599000 [1] => 1588599300 [2] => 1588599600 [ 3] => 1588599900 [4] => 1588600200 [5] => 1588600500) [индикаторы] => Массив ([quote] => Массив ([0] => Массив ([open] => Массив ([0] = > 13.3599996567 [1] => 13.8599996567 [2] => 13.720000267 [3] => 13.8800001144 [4] => 14.0349998474 [5] => 14.051199913) [close] => Массив ([0] => 13.9499998093 [1] = > 13.7299995422 [2] => 13.8400001526 [3] => 14.0450000763 [4] => 14.0600004196 [5] => 14.1899995804) [high] => Array ([0] => 14 [1] => 13.8599996567 [2] = > 13.9399995804 [3] => 14.0900001526 [4] => 14.1000003815 [5] => 14.2600002289) [low] => Массив ([0] => 13.1099996567 [1] => 13.5900001526 [2] => 13.720000267 [3] = > 13.8699998856 [4] => 13.8509998322 [5] => 14) [volume] => Array ([0] => 124733 [1] => 49489 [2] => 51657 [3] => 48362 [4] = > 34055 [5] => 36566)))) )) [ошибка] =>));
$close= $data['chart']['result']['indicators']['close'] ;
echo $close;