[Solved] Replace spaces between first character and second one also reverse remove spaces between last and last but one? [closed]

[ad_1]

preg_replace ('/^(.) (.*) (.)$/', '$1$2$3', $string);

2

[ad_2]

solved Replace spaces between first character and second one also reverse remove spaces between last and last but one? [closed]