Are laravel query results encoded?
问题 In my laravel app, I am trying to trim a result that I get from database. The trim() is not removing the last space in the string. The code is this $institutes = Institute::all(); foreach ($institutes as $institute) { $str = $institute->name; $str = trim($str); //doesn't remove the trailing space $len = strlen($str); } Now, first of all, the length of $str is 1 more than what it should be. It should be 20 but it somehow shows 21 . Another thing, the last character is a space according to my