Array
(
[1] => stdClass Object
(
[position] => 1
[priority] => 1
[percentage] => 100
)
[131] => stdClass Object
(
[position] => 11
[priority] => 12
[percentage] => 80
)
)
this is my array of objects.
Why I cant get object with like this: $a = $niz[1] ?
Convert the stdClass object to php array so you can access it by normal way.
$niz = get_object_vars($niz);
$a = $niz[1];
print_r($a);