My App


// Load the Google API PHP Client Library
require_once 'vendor/autoload.php';

// Set the Google Sheets API key
$apiKey = 'AIzaSyCjNOb5yoP4waggnTqqtpuce4Id0UEl_GY';

// Set the Google Sheets spreadsheet ID
$spreadsheetId = '1WXvn2_UMJ3w1HSmGqEEaPK6niUuJRsd4Q-h9SfJUgFI';

// Set the range of cells to retrieve (e.g. "A1")
$range = 'A1';

// Set up the API client
$client = new Google_Client();
$client->setApplicationName('My App');
$service = new Google_Service_Sheets($client);

// Retrieve the cell data from the API
$response = $service->spreadsheets_values->get($spreadsheetId, $range);
$values = $response->getValues();

// Generate HTML to display the cell data
echo "<p>" . $values[0][0] . "</p>";