----------------
→ Result of get_html_translation_table(HTML_ENTITIES):

Array ( [] =>   [] => ¡ [] => ¢ [] => £ [] => ¤ [] => ¥ [] => ¦ [] => § [] => ¨ [] => © [] => ª [] => « [] => ¬ [] => ­ [] => ® [] => ¯ [] => ° [] => ± [] => ² [] => ³ [] => ´ [] => µ [] => ¶ [] => · [] => ¸ [] => ¹ [] => º [] => » [] => ¼ [] => ½ [] => ¾ [] => ¿ [] => À [] => Á [] => Â [] => Ã [] => Ä [] => Å [] => Æ [] => Ç [] => È [] => É [] => Ê [] => Ë [] => Ì [] => Í [] => Î [] => Ï [] => Ð [] => Ñ [] => Ò [] => Ó [] => Ô [] => Õ [] => Ö [] => × [] => Ø [] => Ù [] => Ú [] => Û [] => Ü [] => Ý [] => Þ [] => ß [] => à [] => á [] => â [] => ã [] => ä [] => å [] => æ [] => ç [] => è [] => é [] => ê [] => ë [] => ì [] => í [] => î [] => ï [] => ð [] => ñ [] => ò [] => ó [] => ô [] => õ [] => ö [] => ÷ [] => ø [] => ù [] => ú [] => û [] => ü [] => ý [] => þ [] => ÿ [&] => & ["] => " [<] => < [>] => > )
----------------
→ How htmletities() works?

echo htmlentities('sign © and &copy;')."<br>";

→ Result:
sign © and &copy;

----------------
→ First function:

$first="You should use dash (<code html>&mdash;</code> or <code>&#151;</code>) between subject and predicate which are nouns. We use sign &#x00A7; (<code html>&#x00A7;</code>) to show the beginning of a paragraph.";
function showMnemonicsFirst($content) {
  $content=preg_replace ("@<code.*?>(.*?)</code>@", htmlentities('$1'), $content);
  return $content;
};
echo showMnemonicsFirst($first);


→ Result:
You should use dash ((— or —) between subject and predicate which are nouns. We use sign § (§) to show the begennng of a paragraph.
----------------
→ htmlentities():

$second="You should use dash ((<code class='code-html'>&mdash;</code> or <code>&#151;</code>) between subject and predicate which are nouns. We use sign &#x00A7; (<code html>&#x00A7;</code>) to show the begennng of a paragraph.";
echo "\$second: ".$second."<br>";
echo "htmlentities(\$second): ".htmlentities($second)."<br>";


→ Result:
$second: You should use dash (( or ) between subject and predicate which are nouns. We use sign § (§) to show the begennng of a paragraph.
htmlentities($second): You should use dash ((<code class='code-html'>&mdash;</code> or <code>&#151;</code>) between subject and predicate which are nouns. We use sign &#x00A7; (<code html>&#x00A7;</code>) to show the begennng of a paragraph.

----------------
→ substr():

$third="You should use dash ((<code class='code-html'>&mdash;</code> or <code>&#151;</code>) between subject and predicate which are nouns. We use sign &#x00A7; (<code html>&#x00A7;</code>) to show the begennng of a paragraph.";
echo "\$third: ".$third."<br>";
echo "Number of inclusions: ".substr_count($third, "<code")."<br>";


→ Result:
$third: You should use dash (( or ) between subject and predicate which are nouns. We use sign § (§) to show the begennng of a paragraph.
Number of inclusions: 3

----------------
→ Second function:

$incoming="You should use dash ((<code class='code-html'>&mdash;</code> or <code>&#151;</code>) between subject and predicate which are nouns. We use sign &#x00A7; (<code html>&#x00A7;</code>) to show the begennng of a paragraph.";
echo "\$incoming: ".$incoming."<br>";
function showMnemonics ($incoming) {
  $iteration=substr_count($incoming, "<code");
  echo "\$iteration: ".$iteration."<br>";
  for ($i=0; $i<$iteration; $i++) {
    if ( preg_match("@<code.*?>(.*?)</code>@", $incoming, $matches)>0 )
      echo "i=" . $i . "&nbsp;:&nbsp;" . $matches[1] . "&nbsp;:&nbsp;" . htmlentities($matches[1]) . "<br>";
      $change=htmlentities($matches[1]);
      echo "change: ".$change."<br>";
      $incoming=preg_replace("@<code.*?>(.*?)</code>@", "<htmlcode>".$change."</htmlcode>", $incoming, 1);
      echo "incoming: ".$incoming."<br>";
    };
  };
  return $incoming;
};
echo showMnemonics($incoming);


→ Result:
$incoming: You should use dash (( or ) between subject and predicate which are nouns. We use sign § (§) to show the begennng of a paragraph.
$iteration: 3
i=0 : — : &mdash;
change: &mdash;
incoming: You should use dash ((&mdash; or ) between subject and predicate which are nouns. We use sign § (§) to show the begennng of a paragraph.
i=1 : — : &#151;
change: &#151;
incoming: You should use dash ((&mdash; or &#151;) between subject and predicate which are nouns. We use sign § (§) to show the begennng of a paragraph.
i=2 : § : &#x00A7;
change: &#x00A7;
incoming: You should use dash ((&mdash; or &#151;) between subject and predicate which are nouns. We use sign § (&#x00A7;) to show the begennng of a paragraph.
You should use dash ((&mdash; or &#151;) between subject and predicate which are nouns. We use sign § (&#x00A7;) to show the begennng of a paragraph.
----------------