john
john

Reputation: 35390

How to access youtube data api json response $t variable in php?

I'm getting a JSON response from the YouTube Data API.

Here is a sample response of the Title variable:

stdClass Object ( [$t] => Video Title )

How do I access the $t variable?

$blah->$t won't work because it looks for a variable by $t, and not a member of $blah with name $t.

Upvotes: 3

Views: 1774

Answers (1)

zerkms
zerkms

Reputation: 254926

$blah->{'$t'}

message to avoid SO message length limit ;)

Upvotes: 15

Related Questions