How to remove white space from string in PHP?By Hardik Savani | May 20, 2016 | | 3386 Viewer | Category : PHP
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);
- Laravel where clause with date_format() example
- Laravel 5 select with count query with group by example
- Simple Example of Bootstrap Lightbox Plugin with demo
- How to get minimum key value of array in PHP?
- How to remove key from array in Laravel 5?
- API Testing Tools in Laravel 5
- How to add CKEditor with image upload using KCFinder in PHP Example Code?