Created
December 31, 2017 16:40
-
-
Save DZuz14/9c12f363d35133e53afef2b46634d85c to your computer and use it in GitHub Desktop.
Get Values From Google Sheets API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$exampleEmail = '[email protected]'; | |
$result = $this->service->spreadsheets_values->get(SHEET_ID, 'C2:C'); | |
$emails = $result->values; | |
// $emails will be an array, that you can loop through | |
for($i = 0; $i < count($emails); $i++) { | |
if($exampleEmail === $emails[$i][0]) { | |
// The email exists in the spreadsheet already. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment