Insert data in for loop

I want to insert data in multiple rows in INSERT statement but it only saves one row.

Below is my code:
$request = \Slim\Slim::getInstance()->request(); $user = json_decode($request->getContentType()); $db = new DbOperation(); // this class is in another file if($upload_files_resp['status']==='success'){ $resp_file_count = count($upload_files_resp['files']['name']); for ($i = 0; $i < $resp_file_count; $i++) { $db->uploadMediaToDb($echo_id, $upload_files_resp['files']['name'][$i], $upload_files_resp['files']['type'][$i], $annotate_array[$i]); } }

And In Another file with class DbOperation()

 public function uploadMediaToDb($echo_id, $filename, $file_type, $annotate_text){
    $stmt = $this->con->prepare("INSERT INTO echo_media(echo_id, echo_media_name, echo_media_type, echo_media_text) values(?, ?, ?, ?)");
    $stmt->bind_param("ssss", $echo_id, $filename, $file_type, $annotate_text);

-----But this works only once even if i have multiple data