php string function to remove whitespace code example
Example 1: remove empty spaces php
$string = str_replace(' ', '', $string);
Example 2: how to trim string in laravel
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}
$string = str_replace(' ', '', $string);
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}