PHP reemplazar el espacio con un bajo
$str = str_replace(' ', '_', $str);
Annoyed Alpaca
$str = str_replace(' ', '_', $str);
<?php
$stripped = str_replace(' ', '', "10 1000 0000 000");
echo $stripped;
$string = preg_replace('/\s+/', '', $string);
<?php
$phone = preg_replace( '/\s+/', '', "01234 567890" );
echo $phone;
$words = ' my words ';
$words = trim($words);
var_dump($words);
// string(8) "my words"
<?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);