create array of POSTs from string array

Viewed 37

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)?

0 Answers
Related