- str_repeat: documentation ( source)
<?php
$updates = [
"service" => "k",
"price" => "85.0",
"id" => "442"
];
//take the keys above and turn them into variables like the ones shown below
$stmt->bind_param(str_repeat("s", count(updates)),$service,$price,$id);