$tr = Array ( [0] => stdClass Object ( [account] => 265388630323288 [category] => move [time] => 1423668673 [amount] => -0.00455848 [otheraccount] => 2309 [comment] => ) [1] => stdClass Object ( [account] => 265388630323288 [category] => move [time] => 1423668673 [amount] => -0.00455848 [otheraccount] => 2309 [comment] => ) )
Выполняю
<?php foreach($tr as $t) : ?>
<?php switch( $t['category'] ) {
...............
Выдает ошибку PHP Fatal error: Cannot use object of type stdClass as array in
Если делаю так
$items = json_decode($tr , true);
или
$items = json_decode($tr);
Получаю json_decode() expects parameter 1 to be string, array given in