dc_eximconfig_configtype='internet'
dc_readhost='domain.ru'
$exp_sep = ',';
$imp_sep = '|';
$str = ',1,2,3,';
$exp = explode($exp_sep,$str);
$arr = null;
if(is_array($exp)) foreach($exp as $v) if(!empty($v)) $arr[] = $v;
if($arr) $str = implode($imp_sep,$arr);