Reputation: 8834
how can I remove this char �
that is produced at the end of my substr string?
Upvotes: 1
Views: 779
Reputation: 5715
This will remove last char from $mystr
.
$newstr = substr($mystr, 0, -1);
Upvotes: 0
Reputation: 16673
is it always there? then maybe do an additional -1 from the length when you take the substring...
Upvotes: 0