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

I get a JSON response from the YouTube data API.

Here is an example response from the Title variable:

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

How do I access the $ t variable?

$ blah โ†’ $ t will not work because it is looking for a variable over $ t, not a member of $ blah named $ t.

+3
source share
1 answer
$blah->{'$t'}

to avoid limiting the length of the SO message;)

+15
source

Source: https://habr.com/ru/post/1748636/


All Articles