In a project that I\'m about to wrap up, I\'ve written and implemented an object-relational mapping solution for PHP. Before the doubters and dreamers cry out \"how on earth
The more modern way to bind parameters dynamically is via the splat/spread operator (...).
Assuming:
$valuesCode for PHP5.6 and higher:
$stmt->bind_param(str_repeat('s', count($values)), ...$values);