Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php remove double spaces to single space

$string = "this is my     string"
$string = preg_replace('/s+/', ' ', $string);
Comment

remove all spaces php

$string = "this is my     string";
$string = preg_replace('/s+/', '', $string);
Comment

PREVIOUS NEXT
Code Example
Php :: how to take input in php 
Php :: concat in laravel 8 
Php :: php datetime to timestamp 
Php :: get current year php 
Php :: create session in php 
Php :: php translate url wpml 
Php :: php remove all parameter from url 
Php :: wp wc get cart item attribute 
Php :: webstorm vs phpstorm 
Php :: laravel create project command 
Php :: wordpress throw to debug.log 
Php :: make model -mcr laravel 
Php :: laravel collection count 
Php :: migrate to an existing table in laravel commad 
Php :: laravel inverse seeder 
Php :: php serialize 
Php :: carbon to mysql datetime 
Php :: how to install dompdf in laravel 
Php :: php mail success message 
Php :: install php 7.4 ubuntu 
Php :: get field acf 
Php :: time zone set in codeigniter 
Php :: convert string to lowercase in php 
Php :: why laravel site loading only 
Php :: CodeIgniter get_where order_by 
Php :: debug $_POST 
Php :: tipo de conexiones a la base de datos en php 
Php :: pdo last id 
Php :: Warning: mysqli_fetch_all() expects parameter 1 to be mysqli_result, bool given in C: ewxammphtdocslearnindex.php on line 11 
Php :: laravel RuntimeException Session store not set on request. 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =