Я пытался взорвать возвращенный массив, и он просто не хочет отображаться.Очевидно, я делаю что-то не так.Вот код для бита, который я испытываю при взрыве.
index.php
include "class_client.php";
$client->set('place', 'home');
$client->placeLookup();
$client->screen($client->response()); //want to replace this to print the selected exploded data as shown at the bottom of this question
class_client.php
private $data = array();
private $response = NULL;
public function set($key, $value) {
$this->data[$key] = $value;
return $this;
}
private function get($key) {
return $this->data[$key];
}
public function response() {
return $this->response;
}
public function placeLookup() {
$this->response = $this->srv()->placeLookup(array('place' => $this->get('place')));
return $this;
}
Вывод
stdClass Object
(
[return] => stdClass Object
(
[fields] => stdClass Object
(
[entries] => Array
(
[0] => stdClass Object
(
[key] => place.status
[value] => HERE
)
[1] => stdClass Object
(
[key] => place.name
[value] => home
)
)
)
[operation] => place.lookup
[success] => TRUE
)
)
Единственные данные, которые я хочу видеть в выходных данных index.php, это:
ЗДЕСЬ (что происходит от [value] в [0] в массиве entry)
home (который получается из [value] в [1] в массиве записей)
Также предпочел бы, чтобы я мог взорваться в class_client.php и вернуть значения обратно в виде нового массива вindex.php (чтобы минимизировать / скрыть код в index.php).
Спасибо !!