Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Created August 22, 2017 12:06
Show Gist options
  • Save DZuz14/314cff9508fd5b6b8efe008379514d8b to your computer and use it in GitHub Desktop.
Save DZuz14/314cff9508fd5b6b8efe008379514d8b to your computer and use it in GitHub Desktop.
Looking for existing values in Google Sheet
<?php
$get= $service->spreadsheets_values->get(SHEET_ID, 'A1:A');
$emails = $get->values;
for($i = 0; $i < count($emails); $i++) {
if($emails[$i][0] === $email_two) {
$is_duplicate = true;
$range = "A".++$i.":H";
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment