I had a value like this $x = 'LA1,LA2,LA3,LA7';
And I want to this value to be execute in my sql.
I know it will return error because missing ''
in each id's. example 'LA1','LA3','LA7'
How to add this symbol so query can execute? Any idea?
$sql = 'SELECT * FROM tbl WHERE id IN ("'.$x.'")';