<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.htmlspecialchars-decode.php',
    1 => 'htmlspecialchars_decode',
    2 => 'Wandelt besondere HTML-Entities zur&uuml;ck in Zeichen um',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.htmlspecialchars.php',
    1 => 'htmlspecialchars',
  ),
  'next' => 
  array (
    0 => 'function.implode.php',
    1 => 'implode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/strings/functions/htmlspecialchars-decode.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.htmlspecialchars-decode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">htmlspecialchars_decode</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">htmlspecialchars_decode</span> &mdash; <span class="dc-title">Wandelt besondere HTML-Entities zurück in Zeichen um</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.htmlspecialchars-decode-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>htmlspecialchars_decode</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401</span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>


  <p class="para rdfs-comment">
   Diese Funktion ist das Gegenstück zu <span class="function"><a href="function.htmlspecialchars.php" class="function">htmlspecialchars()</a></span>.
   Sie wandelt besondere HTML-Auszeichnungen zurück in Zeichen um.
  </p>
  <p class="para">
   Die umgewandelten Entities sind:
   <code class="literal">&amp;amp;</code>, <code class="literal">&amp;quot;</code> (wenn
   <strong><code><a href="string.constants.php#constant.ent-noquotes">ENT_NOQUOTES</a></code></strong> nicht gesetzt ist),
   <code class="literal">&amp;#039;</code> (wenn <strong><code><a href="string.constants.php#constant.ent-quotes">ENT_QUOTES</a></code></strong> gesetzt
   ist), <code class="literal">&amp;lt;</code> und <code class="literal">&amp;gt;</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.htmlspecialchars-decode-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       Die zu dekodierende Zeichenkette.
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Eine Bitmaske von einem oder mehreren der folgenden Flags, die die
       Behandlung von Anführungszeichen sowie den zu nutzenden Dokumententyp
       festlegen. Der Standardwert ist <code class="literal">ENT_QUOTES | ENT_SUBSTITUTE |
       ENT_HTML401</code>.
       <table class="doctable table">
        <caption><strong>Verfügbare <code class="parameter">flags</code>-Konstanten</strong></caption>
        
         <thead>
          <tr>
           <th>Name der Konstante</th>
           <th>Beschreibung</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-compat">ENT_COMPAT</a></code></strong></td>
           <td>
            Wandelt doppelte Anführungszeichen um und lässt einfache
            Anführungszeichen unverändert.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-quotes">ENT_QUOTES</a></code></strong></td>
           <td>
            Wandelt sowohl doppelte als auch einfache Anführungszeichen um.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-noquotes">ENT_NOQUOTES</a></code></strong></td>
           <td>
            Lässt sowohl doppelte als auch einfache Anführungszeichen
            unverändert.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-substitute">ENT_SUBSTITUTE</a></code></strong></td>
           <td>
            Ersetzt ungültige Code-Unit-Sequenzen mit dem
            Unicode-Ersatzzeichen U+FFFD (UTF-8) oder &amp;#xFFFD;
            (andernfalls), anstatt eine leere Zeichenkette zurückzugeben.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-html401">ENT_HTML401</a></code></strong></td>
           <td>
            Behandle Code als HTML 4.01.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-xml1">ENT_XML1</a></code></strong></td>
           <td>
            Behandle Code als XML 1.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-xhtml">ENT_XHTML</a></code></strong></td>
           <td>
            Behandle Code als XHTML.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="string.constants.php#constant.ent-html5">ENT_HTML5</a></code></strong></td>
           <td>
            Behandle Code als HTML 5.
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.htmlspecialchars-decode-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt die dekodierte Zeichenkette zurück.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.htmlspecialchars-decode-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.1.0</td>
      <td>
       <code class="parameter">flags</code> geändert von
       <strong><code><a href="string.constants.php#constant.ent-compat">ENT_COMPAT</a></code></strong> zu <strong><code><a href="string.constants.php#constant.ent-quotes">ENT_QUOTES</a></code></strong> |
       <strong><code><a href="string.constants.php#constant.ent-substitute">ENT_SUBSTITUTE</a></code></strong> | <strong><code><a href="string.constants.php#constant.ent-html401">ENT_HTML401</a></code></strong>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.htmlspecialchars-decode-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 Ein <span class="function"><strong>htmlspecialchars_decode()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$str </span><span style="color: #007700">= </span><span style="color: #DD0000">"&lt;p&gt;this -&amp;gt; &amp;quot;&lt;/p&gt;\n"</span><span style="color: #007700">;<br /><br />echo </span><span style="color: #0000BB">htmlspecialchars_decode</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Beachten Sie, dass die Anführungszeichen nicht umgewandelt werden<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">htmlspecialchars_decode</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">ENT_NOQUOTES</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">&lt;p&gt;this -&gt; &quot;&lt;/p&gt;
&lt;p&gt;this -&gt; &amp;quot;&lt;/p&gt;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.htmlspecialchars-decode-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.htmlspecialchars.php" class="function" rel="rdfs-seeAlso">htmlspecialchars()</a> - Wandelt Sonderzeichen in HTML-Entities um</span></li>
    <li><span class="function"><a href="function.html-entity-decode.php" class="function" rel="rdfs-seeAlso">html_entity_decode()</a> - Wandelt HTML-Entities in ihre entsprechenden Zeichen um</span></li>
    <li><span class="function"><a href="function.get-html-translation-table.php" class="function" rel="rdfs-seeAlso">get_html_translation_table()</a> - Liefert die Umwandlungstabelle, die von
   htmlspecialchars und htmlentities
   verwendet wird</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>