in codeiginitor remove blank in string left right code example
Example 1: remove whitespace from string php
$str = "\n\n\nHello World!\n\n\n";
echo "With trim: " . trim($str);
Example 2: how to trim string in laravel
{{ \Illuminate\Support\Str::limit($productVal, 20, $end='...') }}