mysqli bind_param - 避免列出所有内容

I have this bind_param statement - and it works, but its ugly

$record-> bind_param($sss, 
$fieldNameValues[0],
$fieldNameValues[1],
$fieldNameValues[2],
$fieldNameValues[3],
$fieldNameValues[4],
etc
$fieldNameValues[10],
$fieldNameValues[11]
);

$sss is just equal to "sss...s" and seems to work fine

I want to put an array (or a loop) or something into the bind_param statement instead of all the $fieldNameValues[x] ... but I can't seem to make it work

Any tips please

You can use call_user_func_array() to call the bind_param() method with the given array as arguments.

When you use PDO you can use the execute() method to provide the values for the prepared statement.