3

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.

1 Answer 1

15
$blah->{'$t'}

message to avoid SO message length limit ;)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.