I have a form which is a select multiple input which POSTs values like this: option1,option2,option3
etc..
How is the best way to convert this to 'option1','option2','option3'
etc...
Currenty I'm doing this, but it feels wrong??
$variable = explode(",", $variable);
$variable = implode("','", $variable);
The reason why I'm doing this is because I want to use the form select multiple inputs in a SQL Query using IN.
SELECT * FROM TABLE WHERE some_column IN ('$variable')
'
? Or do you put it in some code you don't show? – BybidderFIND_IN_SET()
then, escaping-wise. – Rescissory