Welcome Guest, Not a member yet? Register   Sign In
How to get value from array? message: "Cannot use object of type stdClass as array"
#3

(This post was last modified: 10-02-2018, 04:14 AM by DELE.)

(10-02-2018, 02:50 AM)kaitenz Wrote: That's easy.

PHP Code:
$details->production_companies[0]->id;

// Or

$a = ($details->production_companies);
$a[0]->id

before i use this code "$a[0]->id;" but message error.
but after I tried again it turned out to be. Surprisingly.

there might be an error when defining $a. hehe

Thanks
Reply


Messages In This Thread
RE: How to get value from array? message: "Cannot use object of type stdClass as ... - by DELE - 10-02-2018, 04:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB