How to replace or remove spaces between first and second letter of a string and also remove space between last and last but one character using php ?

Example :

```
$string = "$ 1000,00 1000 10000 1000 $";

```

I want to display the string like

```
$string ="$1000,00 1000 10000 1000$";

```

Please help me ?