Web >> Development >> PHP >>  How to remove multiple white space characters

How to remove multiple leading white space character $text = preg_replace('/\s+/','', $text);