How to remove white space from string in PHP?By Hardik Savani | May 20, 2016 | | 1345 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);
- How to generate route with query string parameter in Laravel 5?
- How to get last inserted id in laravel 5?
- How to connect mysql database in node js with example?
- Codeigniter 3 and AngularJS CRUD with Search and Pagination Example.
- Angular $scope.form value undefined on submit in ionic framework.
- How to execute mysql query in laravel?
- How to store all record in laravel5 Cache