troubleshooting Question

PHP Class new item, cannot call it correctly?

Avatar of Craig Lambie
Craig LambieFlag for Australia asked on
ProgrammingPHPProgramming Theory
10 Comments1 Solution667 ViewsLast Modified:
Hi Experts,

I am banging my head against the wall, and I am sure it is due to not knowing PHP as well as I should!
I am trying to call this new class, and keep getting the error "Undefined variable: Google_Playlist" which I can only assume is due to me not calling the class properly.

$youtube = new Google_YoutubeService($client);
//update Playlist Name here
			$ListOb = new $youtube->$Google_Playlist();
			$ListOb.setId($item['id']);
			$InSnip = new $youtube->Google_PlaylistSnippet();
			$InSnip.setChannelId($item['id']);
			$InSnip.setTitle(str_replace("Candidates Federal","Candidates Australian Federal",$title));
			$ListOb.setSnippet($InSnip);

I am using this PHP library to access Youtube API, with some success, but have gotten stuck at needing to create a Google_Playlist class item to do an update.

Google API Library

Your help and thoughts are appreciated greatly.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros