<?php
$con = mysqli_connect(localhost, Restax_final, Restax_final123, Restax_api_data);     

$files = $request->getUploadedFiles();

count($files['units']);
 
 
for($i=0;$i<=count($files['units']);$i++)
{
  $uploadedFile = $files['units'][$i];
  
  $filename[] = $uploadedFile->getClientFilename();
  $uploadedFile->moveTo('uploads/exams/'.$filename[$i]);
//   print_r($filename);

$response=array('status'=>"true",'Message'=>"File upload successfully");
   
}

echo json_encode($response);


?>