I want to put a array in the values of a checkbox but as string and so that they are separated by% use in a mysql query array('string1','string2')
.
These values come from a checkbox for a session:
$variavel= $_SESSION['checkbox'] = implode(',',$_POST['checkbox']);
In this way, it separates only the values with IN('string1','string2')
, ,
, but when together a value string it gives error.
How can I merge each value into the array to be array(int1,int2)
?