{"custom_fields_values":[{"field_id":field_id,"values":null}]}
use Google\Client;
use Google\Service\Drive;
function searchFiles()
{
try {
$client = new Client();
$client->useApplicationDefaultCredentials();
$client->addScope(Drive::DRIVE);
$driveService = new Drive($client);
$files = array();
$pageToken = null;
do {
$response = $driveService->files->listFiles(array(
'q' => "mimeType='image/jpeg'",
'spaces' => 'drive',
'pageToken' => $pageToken,
'fields' => 'nextPageToken, files(id, name)',
));
foreach ($response->files as $file) {
printf("Found file: %s (%s)\n", $file->name, $file->id);
}
array_push($files, $response->files);
$pageToken = $response->pageToken;
} while ($pageToken != null);
return $files;
} catch(Exception $e) {
echo "Error Message: ".$e;
}
}
$input = [
'111',
'222',
];
$arrays = [
[
'new',
'confirmed'
],
[
'7777',
'XXXX'
]
];
$params = [
'state',
'warehouse'
];
$result = [];
for ($i = 0; $i < count($input); $i++) {
$key = $input[$i];
$result[$key] = [];
for ($j = 0; $j < count($params); $j++) {
$result[$key][$params[$j]] = $arrays[$j][$i];
}
}
print_r($result);