Thanks Jeff! I get it now. Here's what I came up with..
$printjobs = getAllJobs(); # Display report id for each report. for ($i = 0; $i < count($printjobs); $i++) { echo 'Report ID is "' . $printjobs[$i]['id'] . '"'; } And it returned the Report Ids for each report. (Report ID is "675426353"Report ID is "675438683") I only have one report listed and one template. Does it include the template as a report too? Also, is the first report in the array always the most recent one? Thanks so much, Daniel On Jan 6, 9:17 am, AdWords API Advisor <adwordsapiadvi...@google.com> wrote: > Hello Dan, > > General information about arrays in PHP can be found at > > http://us.php.net/types.array > > The getAllJobs() call should return an array of ReportJob objects, and > each object has an id property. So you'd want to either iterate > through the entire array or access a specific element (if you know in > advance which element you're interested in, which you normally > wouldn't). Once you have a reference to a given ReportJob object, you > can take a look at its id property. > > If you're looking for a generic PHP example of iterating through an > array of data returned from the SOAP service and looking at its > properties, lines 62-66 of this might be helpful: > > http://code.google.com/p/adwords-api-php-samples/source/browse/trunk/... > > Cheers, > -Jeff Posnick, AdWords API Team > > On Jan 6, 12:05 pm, Acapella <daniel_pow...@centerpointe.com> wrote: > > > Thanks, Jeff. > > > I've looked everywhere it seems and can't find the syntax on how to > > reference the id element in the getalljobs() array. Can you just give > > me an example, or point me to where it might be? I am new to PHP and > > the API and am just using it on this project. > > > Thanks for all your help! > > > Dan > > > On Jan 5, 2:43 pm, AdWords API Advisor <adwordsapiadvi...@google.com> > > wrote: > > > > Hello Dan, > > > > There is automatic way to do the mapping. If you search this group > > > for some past posts on the subject you can get a feel for what others > > > have done and some of the caveats. For example: > > > > http://groups.google.com/group/adwords-api/browse_thread/thread/b987a... > > > > Cheers, > > > -Jeff Posnick, AdWords API Team > > > > On Jan 5, 4:43 pm, Acapella <daniel_pow...@centerpointe.com> wrote: > > > > > Hello, > > > > > I want to download a report programmatically using PHP and I'd like to > > > > schedule it daily to download a report scheduled from the Adwords Web > > > > Page. Is there a straightforward way of doing this? How do I get the > > > > ReportId and JobId for an existing report? > > > > > I was going to use getReportDownloadUrl but it needs the jobId. I > > > > called GetAllJobs which returned an array, but How do I reference > > > > items in that array? I tried GetAllJobs([2]) to get the Report ID but > > > > to no avail. > > > > > Thanks for any help you can give! > > > > > Yours, > > > > > Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~----------~----~----~----~------~----~------~--~---