Answers for "strip spaces of string php"

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

remove whitespace from string php

$str = "nnnHello World!nnn";
echo "With trim: " . trim($str);
Posted by: Guest on July-10-2020

Browse Popular Code Answers by Language