Let's say I have an array of strings:
$arr = array('prop1', 'prop2', 'prop3');
and I want to use this array to create bind_param for sql request. Each string of the array however should be inside $_POST[]. So this should be the result:
$stmt->bind_param("sss", $_POST['prop1'], $_POST['prop2'], $_POST['prop3']);
Is something like that possible (PHP 7.x)?
$_POSTyou can just unpack the array inbind_paramusing...(splat operator)$_POST['prop1']in your bind_param statement, so where else is that value supposed to come from, if not $_POST?$arr, you add the corresponding $_POST element to your new array. And then you use that new array in your bind_param call, with the spread operator.