$this->load->library('opencloud');
$opencloud = new Opencloud;
$containers = $this->opencloud->list_containers();
print_r($containers);
上面的代码输出以下数组:
数组 ( [0] => 数组 ( [name] => .CDN_ACCESS_LOGS [count] => 2 [bytes] => 606 ) [1] => Array ( [name] => Michael Grigsby [count] => 9 [ bytes] => 891976 ) [2] => Array ( [name] => Random Photos [count] => 0 [bytes] => 0 ) [3] => Array ( [name] => hello [count] = > 10 [bytes] => 1129257 ) [4] => Array ( [name] => hello_world [count] => 1 [bytes] => 659737 ) [5] => Array ( [name] => hi [count ] => 0 [字节] => 0 ) )
当我回显时,$containers[1]['name']
我得到:Michael Grigsby
。我的问题是如何让脚本输出所有name
值而不是简单的一个?