In this case, i just want to add just before , but i don't want to add that already has before . What to to add or edit from the below Regex?
$string = "One two three four five six seven";
Result i want : One two three four five six seven
$xx = preg_replace_callback(
'//',
function ($addtag) {
return "".$addtag[0];
},
$string
);
echo $xx;
Result i want : One two three four five six seven
No comments:
Post a Comment
Thanks