$senderId=11;//want to remove this
$list = 4,5,11,22;
$array1 = Array($senderId);
$array2 = explode(',', $list);
$array3 = array_diff($array2, $array1);
$output = implode(',', $array3);//your result 4,5,22
How to remove/delete one value from comma seprated string in PHP?
Ad comes here
PHP blog
Comments
Leave A Comment