My goal is to create a string, where each word is surrounded by quotations. I need later to input it to an sql statement, such as "SELECT * from tbl WHERE name is IN ('keyword1', 'keyword2')". I tried to input keywords without quoations, it gives an error.
So, I get from $_POST[keywords_main] multiple keywords, and after I join them, I get a string of keywords without quotations.
I was thinking about adding quotations to each word in a resulting string $strkeywords , or put keywords in array and add quotations to each array element. I don't know if there is a function either for an array or a string.
Please help,
Thank you,