I am trying to echo a string named $usersname.
Often $usersname has an ‘’ appended to the end which I need to eliminate.
I currently use strpos() but I thought preg_replace would be better.
How can I echo $usersname without the '’ on the end, when it has one.
For example: $username = John Doe*
I want to display only: John Doe