Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php Convert String containing commas to array

$string = "'1', '2', '3'"; 
$string = str_replace("'", '', $string);

$sql = "SELECT * FROM name WHERE id NOT IN ( " . implode(",", explode(',',$string)) . ") LIMIT 10 ";
echo $sql;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #Convert #String #commas #array
ADD COMMENT
Topic
Name
1+8 =