I'm writing a dynamic search page for my mysql database.
I'm having trouble with my mysqli_stmt_bin d_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.
The implode function creates the string, "100,500,80 0".
However I need it to work like this:
Any ideas? Thanks in advance!
I'm having trouble with my mysqli_stmt_bin d_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.
Code:
//Excerpt
$paramArray[] = 100;
$paramArray[] = 500;
$paramArray[] = 800;
...
mysqli_stmt_bind_param($stmt, "iii", implode(",",$paramArray));
However I need it to work like this:
Code:
mysqli_stmt_bind_param($stmt, "iii", $paramArray[0], $paramArray[1], $paramArray[2]);
Comment