Answers for "php string replace all spaces"

PHP
6

remove spaces from string php

<?php
$phone = preg_replace( '/\s+/', '', "01234 567890" );
echo $phone;
Posted by: Guest on May-31-2020
0

php string replace space

$journalName = preg_replace('/\s+/', '_', $journalName);
Posted by: Guest on February-05-2021
1

remove whitespace from string php

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

Code answers related to "php string replace all spaces"

Browse Popular Code Answers by Language