How to remove white space from string in PHP?By Hardik Savani | May 20, 2016 | | 1885 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);
- How to remove special characters by mysql custom function.
- Ajax Image Upload Example with Validation in PHP Laravel Framework
- Laravel 5 - How to create custom error page with example
- Bootstrap daterangepicker example code with demo using daterangepicker.js
- How to send mail using mailable in laravel 5.3?
- MySql comma separated column join in PHP Laravel 5
- Mysql procedure with pagination in laravel 5?
- How to convert line breaks to br in jQuery ?