space reduce in php code example Example: remove space from string php <?php $stripped = str_replace(' ', '', "10 1000 0000 000"); echo $stripped;