Answers for "remove spaces php variable"

PHP
9

remove space from string php

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

Remove All Spaces Out of a String in PHP

phpCopy<?php 
$searchString = " ";
$replaceString = "";
$originalString = "This is a programming tutorial"; 
 
$outputString = preg_replace('/\s+/', '', $originalString); 
echo("The original string is: $originalString \n");  
echo("The string without spaces is: $outputString \n"); 
?>
Posted by: Guest on April-23-2021
0

php remove space from string

<?php
$name = "Yeasin_ahammed_apon"
#str_replace('what u want to replace', 'with what ', $name);
str_replace('_', ' ', $name);
echo $name;
# output: Yeasin ahammed apon
?>
#str_replace('what u want to replace', 'with what ', $name);
Posted by: Guest on March-23-2022

Browse Popular Code Answers by Language