i want to replace multiple spaces or   with one space so i have tried below code using preg_replace function, 
so it replaces spaces correctly but it also puts unrecognized characters in output string,
for demo i am taking $string variable but in actual it can be data from serverside database, see below code:
<?php 
     $string = "123080345 900113760  165604100012";
     echo preg_replace("/(\s| )+/",' ',$string);
     //output: 123080345� 900113760� 165604100012
     //expected output: 123080345 900113760 165604100012
So my question is why preg_replace putting unrecognized characters and how to get clean and clear output,
which doesn't have unrecognized characters as i have shown in above code as expected output
