How to remove white space from string in PHP?By Hardik Savani | May 20, 2016 | | 1223 Viewer | Category : PHP
Share this post:
Sometimes we require to remove white space from given string. So at that time you can delete spaces from string using str_replace() of core php. str_replace() will help to replace whitespace that way we can remove. you can do it from bellow example.
$myString = "this is only for you";
$resultString = str_replace(' ', '', $myString);
- PHP download file from url using curl example
- How to define Global Variables in Laravel 5?
- PHP: How to count files in folder?
- Laravel 5 - How to get difference of time in minutes?
- How to solve - you dont have permission to upload files in KCFinder ?
- Laravel 5.2 API using JWT authentication tutorial from scratch example
- How to use foreach object in Nodejs ?
- How to get last record of database table in Laravel?