How to remove white space from string in PHP?By Hardik Savani | May 20, 2016 | | 557 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 get current controller name in view Laravel 5?
- How to get location information from ip address in Laravel ?
- How to get current month records in Laravel 5?
- How to set Datepicker in bootstrap?
- How to get ckeditor value with tags on ajax-submit ?
- Laravel 5 Ajax CRUD with Pagination example and demo from scratch
- How to implement infinite ajax scroll pagination in Laravel 5?
- Laravel 5.2 multi auth example using Auth guard from scratch