<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.stripslashes.php',
    1 => 'stripslashes',
    2 => 'Un-quotes a quoted string',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Функції',
  ),
  'prev' => 
  array (
    0 => 'function.stripos.php',
    1 => 'stripos',
  ),
  'next' => 
  array (
    0 => 'function.stristr.php',
    1 => 'stristr',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    '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">Un-quotes a quoted string</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.stripslashes-description">
  <h3 class="title">Опис</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">
   Un-quotes a quoted string.
  </p>
  <p class="para">
   <span class="function"><strong>stripslashes()</strong></span> can be used if you aren&#039;t inserting
   this data into a place (such as a database) that requires escaping.
   For example, if you&#039;re simply outputting data straight from an HTML form.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.stripslashes-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       The input string.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.stripslashes-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns a string with backslashes stripped off.
   (<code class="literal">\&#039;</code> becomes <code class="literal">&#039;</code> and so on.)
   Double backslashes (<code class="literal">\\</code>) are made into a single
   backslash (<code class="literal">\</code>).
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.stripslashes-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 A <span class="function"><strong>stripslashes()</strong></span> example</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">"Is your name O\'reilly?"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">// Outputs: Is your 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">Зауваження</strong>: 
   <p class="para">
    <span class="function"><strong>stripslashes()</strong></span> is not recursive. If you want to apply
    this function to a multi-dimensional array, you need to use a recursive
    function.
   </p>
  </p></blockquote>
  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Приклад #2 Using <span class="function"><strong>stripslashes()</strong></span> on an 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">// Example<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">// Output<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>Поданий вище приклад
виведе:</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">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.addslashes.php" class="function" rel="rdfs-seeAlso">addslashes()</a> - Quote string with slashes</span></li>
    <li><span class="function"><a href="function.get-magic-quotes-gpc.php" class="function" rel="rdfs-seeAlso">get_magic_quotes_gpc()</a> - Gets the current configuration setting of magic_quotes_gpc</span></li>
   </ul>
  </p>
 </div>


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