Answers for "php remove spaces between the string"

PHP
7

remove space from string php

<?php
$stripped = str_replace(' ', '', "10 1000 0000 000");
echo $stripped;
Posted by: Guest on March-12-2020
2

php remove space before and after string

$words = '      my words     ';
$words = trim($words);
var_dump($words);
// string(8) "my words"
Posted by: Guest on January-28-2021

Code answers related to "php remove spaces between the string"

Browse Popular Code Answers by Language