title: Create a sub folder using google-drive-api and return the id with PHP
body: <p>I can create the sub folder just fine with the code below but I just can't return the id.  </p>
  
  <p>I would like to get the id and/or the link to the folder so I can add them to my database.</p>
  
  <p>Currently the below creates the folder but just returns "//" as the id!</p>
  
  <p>Thanks for your help</p>
  
  <pre><code>&lt;?php
  
  if ($client-&gt;getAccessToken()) {
  
  $file = new Google_DriveFile();
  
  //Setup the Folder to Create
  $file-&gt;setTitle('Project  Folder');
  $file-&gt;setDescription('A Project Folder');
  $file-&gt;setMimeType('application/vnd.google-apps.folder');
  
  //Set the ProjectsFolder Parent
  $parent = new Google_ParentReference();
  $parent-&gt;setId('0B9mYBlahBlahBlah');
  $file-&gt;setParents(array($parent));
  
  //create the ProjectFolder in the Parent
  $createdFile = $service-&gt;files-&gt;insert($file, array(
      'mimeType' =&gt; 'application/vnd.google-apps.folder',
  ));
  
  // print_r($createdFile);
  print "folder created sucessfully";
  echo "folder id is" . $createdFile-&gt;id;
  }
  ?&gt;
  </code></pre>