PHP add character to the end of every new word -
i have string of words separated spaces (except last word) , know if there way add character end of each new word. example:
$string = "this short string of words"
would become
$string = "this; is; a; short; string; of; words;"
thanks
$str = 'lorem ipsum'; $str_modified = str_replace(' ','; ',trim($str)).';';
Comments
Post a Comment