This is a sample code
$a=array('a,b','cd');
$b=implode(',',$a);
$c=explode(',',$b);
print_r($c);
because I have ‘,’ in $a[0] print_r($c); result is
Array ( [0] => a [1] => b [2] => cd )
is there any option to explode ignore ‘,’ in string and I have
Array ( [0] => a,b [3] => b [2] => cd )
or only solution is choose better separator like “*?-“
Once you implode the array with a character that it’s already in any of the elements, there’s no simple way to detect that. So my recommendation is for you to change the separator, or you will end up comparing your string with the original array, and that will become a mess.