Remove space in PHP that was added using JavaScript -
my requirement add space after comma using javascript , added space should using
php in order continue operation.
javascript:
return date.replace(/\,/g ,', ');
php code:
$reqfilterdata['reqfrmdt'] = preg_replace('/\s+/', '', $reqfilterdata['reqfrmdt']);
$reqfilterdata['reqfrmdt']
variable has date value. please me
try str_replace
$reqfilterdata['reqfrmdt'] = str_replace(", ",",",$reqfilterdata['reqfrmdt']);