Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Created December 31, 2017 16:27
Show Gist options
  • Save DZuz14/4683634f69577c6432be9f2ca14d343b to your computer and use it in GitHub Desktop.
Save DZuz14/4683634f69577c6432be9f2ca14d343b to your computer and use it in GitHub Desktop.
Appending To A Google Sheet Via PHP
<?php
$formData = array("Mike Rosoft", "24637", "mikerosoft@gmail.com", "14562342943");
$options = array('valueInputOption' => 'RAW');
$values = [$formData];
$body = new Google_Service_Sheets_ValueRange(['values' => $values]);
$append = $this->service->spreadsheets_values->append(SHEET_ID, 'A2:D', $body, $options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment