I still can't figure out the context of the question. Are you trying to quote/escape special characters for HTML, PHP, or SQL?
If you are asking about HTML entities, read this:
http://www.bbsinc.com/iso8859.html
... which documents how HTML handles various entities.
It appears that the characters you typed were the apostrophe, the semicolon, the dollar sign, and the ampersand. Of those, HTML cares especially about the ampersand, which is used to escape to a named HTML entity or a numeric HTML reference. The others will be rendered just fine and you don't need to convert them.
PHP introduces special processing to the handling of character strings that is an entirely separate issue. Of the characters you typed, within a doublequoted PHP string, only the question mark (which triggers an attempt at variable substitution) would be an issue. In a single-quoted string, the apostrophe also would present a problem. Quoting metacharacters within a PHP string is done by prepending a backslash.
Passing character strings to SQL adds another layer of complexity to worry about.
PHP provides functions as part of the string library that can be used to help with all of these issues. See the documentation of the following:
addslashes()
stripslashes()
htmlentities()
htmlspecialchars()
quotemeta()