Skip to content
Advertisement

Tag: special-characters

User ID remove @ and transform “.” into “-“

I have this function in order to set a link for my user to go to their custom profile page : The issue is that if the user ID is his email like john@example.com the link https://mywebsite/author/john@example.com will have an 403 error. But if the is the link is https://mywebsite/author/johnexample-com it works. So is there a way to clean the

How to display special characters in PHP

I’ve seen this asked several times, but not with a good resolution. I have the following string: I want to print or echo the string, but the output will return <p>R�sum�</p>. So I try htmlspecialchars() or htmlentities() which outputs &lt;p&gt;R&eacute;sum&eacute;&lt;p&gt; and the browser renders &lt;p&gt;R&eacute;sum&eacute;&lt;p&gt;. I want it, obviously, to render this: Résumé And I’m using UTF-8: What am I

Advertisement