PHP Build a Basic PHP Website (2018) Adding a Basic Form Setting Up the Initial Form

Ryan Schmelter
Ryan Schmelter
9,710 Points

Why would we need &rsquo to create an apostrophe inside of p tags?

I'm not sure why this is necessary.

1 Answer

Steven Parker
Steven Parker
207,989 Points

That's no ordinary apostrophe! That's a "curly" or "word processing" style fancy apostrophe. Using the character entity allows the browser to render it without the server having to store or transmit anything other than common ASCII characters. This eliminates any risk of it getting altered by some process along the way.

Ryan Schmelter
Ryan Schmelter
9,710 Points

I appreciate the response Steven. Why exactly is this necessary though. It's not like that part of the text is getting submitted in the form. Thanks!

Steven Parker
Steven Parker
207,989 Points

No, but it is stored at the server, and then transmitted from the server to the browser to be displayed.

Steven Parker
Steven Parker
207,989 Points

Ryan Schmelter — Did that resolve your issue? You can mark a question solved by choosing a "best answer".
And happy coding!