<?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.stripslashes.php',
    1 => 'stripslashes',
    2 => 'Entfernt Maskierungszeichen aus einem String',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.stripos.php',
    1 => 'stripos',
  ),
  'next' => 
  array (
    0 => 'function.stristr.php',
    1 => 'stristr',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/strings/functions/stripslashes.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.stripslashes" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stripslashes</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">stripslashes</span> &mdash; <span class="dc-title">Entfernt Maskierungszeichen aus einem String</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.stripslashes-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>stripslashes</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="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Entfernt Maskierungszeichen aus einem String.
  </p>
  <p class="para">
   <span class="function"><strong>stripslashes()</strong></span> kann verwendet werden, wenn Sie
   die Daten nicht an einer Stelle einfügen wollen, die eigenes Maskieren
   erfordert (z. B. eine Datenbank). Zum Beispiel, wenn Sie Daten direkt aus
   einem HTML-Formular verarbeiten wollen.
</p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.stripslashes-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       Die Eingabezeichenkette.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.stripslashes-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt einen String zurück, aus dem alle Backslashes (&quot;\&quot;) entfernt wurden.
   (<code class="literal">\&#039;</code> wird zu <code class="literal">&#039;</code> usw.).
   Doppelte Backslashes (<code class="literal">\\</code>) werden zu einem einfachen
   Backslash (<code class="literal">\</code>) umgesetzt.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.stripslashes-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 Ein <span class="function"><strong>stripslashes()</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">"Ist Ihr Name O\'reilly?"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Ausgabe: Ist Ihr Name O'reilly?<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">stripslashes</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    <span class="function"><strong>stripslashes()</strong></span> ist nicht rekursiv. Wenn Sie die
    Funktion auf ein mehrdimensionales Array anwenden wollen, müssen Sie eine
    rekursive Funktion verwenden.
   </p>
  </p></blockquote>
  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Beispiel #2 Verwendung von <span class="function"><strong>stripslashes()</strong></span> in einem Array</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">stripslashes_deep</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">)<br />{<br />    </span><span style="color: #0000BB">$value </span><span style="color: #007700">= </span><span style="color: #0000BB">is_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">) ?<br />                </span><span style="color: #0000BB">array_map</span><span style="color: #007700">(</span><span style="color: #DD0000">'stripslashes_deep'</span><span style="color: #007700">, </span><span style="color: #0000BB">$value</span><span style="color: #007700">) :<br />                </span><span style="color: #0000BB">stripslashes</span><span style="color: #007700">(</span><span style="color: #0000BB">$value</span><span style="color: #007700">);<br /><br />    return </span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">// Beispiel<br /></span><span style="color: #0000BB">$array </span><span style="color: #007700">= array(</span><span style="color: #DD0000">"f\\'oo"</span><span style="color: #007700">, </span><span style="color: #DD0000">"b\\'ar"</span><span style="color: #007700">, array(</span><span style="color: #DD0000">"fo\\'o"</span><span style="color: #007700">, </span><span style="color: #DD0000">"b\\'ar"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$array </span><span style="color: #007700">= </span><span style="color: #0000BB">stripslashes_deep</span><span style="color: #007700">(</span><span style="color: #0000BB">$array</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Ausgabe<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$array</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">Array
(
    [0] =&gt; f&#039;oo
    [1] =&gt; b&#039;ar
    [2] =&gt; Array
        (
            [0] =&gt; fo&#039;o
            [1] =&gt; b&#039;ar
        )

)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.stripslashes-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.addslashes.php" class="function" rel="rdfs-seeAlso">addslashes()</a> - Stellt bestimmten Zeichen eines Strings ein &quot;\&quot; voran</span></li>
    <li><span class="function"><a href="function.get-magic-quotes-gpc.php" class="function" rel="rdfs-seeAlso">get_magic_quotes_gpc()</a> - Liefert die aktuelle Konfiguration von magic_quotes_gpc</span></li>
   </ul>
  </p>
 </div>


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