<?php $json_data = array ( 'data' => array ( 0 => array ( 'title' => 'currency1', 'tickers' => array ( 0 => 'USD' ), ), 1 => array ( 'title' => 'currency2', 'tickers' => array ( 0 => 'USD', 1 => 'EUR' ), ), 2 => array ( 'title' => 'currency3', 'tickers' => array ( 0 => 'USD' ), ) ) ); foreach ($json_data['data'] as $key => $story) { $tickers = $story['tickers']; if (count($tickers) != 1) continue; $title = $story['title']; echo "$title Key is $key and tickers is {$tickers[0]}\n"; }
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`