I'm having trouble with my mysqli_stmt_bind_param() statement entering multiple parameters.
Before the statement I am saving all my parameters in to an array called $paramArray.
How would I add each element of the $paramArray to end of the function arguments?
My original thought was to implode the array with the "," delimiter. However, the function will treat the implode as a single string.
Expand|Select|Wrap|Line Numbers
- //Excerpt
- $paramArray[] = 100;
- $paramArray[] = 500;
- $paramArray[] = 800;
- ...
- mysqli_stmt_bind_param($stmt, "iii", implode(",",$paramArray));
However I need it to work like this:
Expand|Select|Wrap|Line Numbers
- mysqli_stmt_bind_param($stmt, "iii", $paramArray[0], $paramArray[1], $paramArray[2]);