downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.iconv-get-encoding.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.iconv.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.iconv-get-encoding.php',
   
1 => 'iconv_get_encoding',
  ),
 
'up' =>
  array (
   
0 => 'ref.iconv.php',
   
1 => 'iconv Functions',
  ),
 
'prev' =>
  array (
   
0 => 'ref.iconv.php',
   
1 => 'iconv Functions',
  ),
 
'next' =>
  array (
   
0 => 'function.iconv-mime-decode-headers.php',
   
1 => 'iconv_mime_decode_headers',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.iconv-get-encoding" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">iconv_get_encoding</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5)</p><p class="refpurpose"><span class="refname">iconv_get_encoding</span> &mdash; <span class="dc-title">Retrieve internal configuration variables of iconv extension</span></p>

 </div>
 
 <a name="function.iconv-get-encoding.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b>iconv_get_encoding</b></span>
    ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$type</tt><span class="initializer"> = &quot;all&quot;</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Retrieve internal configuration variables of iconv extension.
  </p>
 </div>


 <a name="function.iconv-get-encoding.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">type</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The value of the optional <i><tt class="parameter">type</tt></i>
 can be:
       </p><ul class="simplelist">
        <li class="member">all</li>
        <li class="member">input_encoding</li>
        <li class="member">output_encoding</li>
        <li class="member">internal_encoding</li>
       </ul><p>
      </p>
     </dd>

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


 <a name="function.iconv-get-encoding.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the current value of the internal configuration variable if
   successful or <b><tt class="constant">FALSE</tt></b> on failure.
  </p>
  <p class="para">
   If <i><tt class="parameter">type</tt></i>
 is omitted or set to &quot;all&quot;,
   <b>iconv_get_encoding()</b> returns an array that
   stores all these variables.
  </p>
 </div>


 <a name="function.iconv-get-encoding.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>iconv_get_encoding()</b> example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
&lt;pre&gt;<br /><span style="color: #0000BB">&lt;?php<br />iconv_set_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">"internal_encoding"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">iconv_set_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">"output_encoding"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"ISO-8859-1"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">iconv_get_encoding</span><span style="color: #007700">(</span><span style="color: #DD0000">'all'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;<br /></span>&lt;/pre&gt;</span>
</code></div>
    </div>

    <div class="example-contents para"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [input_encoding] =&gt; ISO-8859-1
    [output_encoding] =&gt; ISO-8859-1
    [internal_encoding] =&gt; UTF-8
)

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


 <a name="function.iconv-get-encoding.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.iconv-set-encoding.php" class="function" rel="rdfs-seeAlso">iconv_set_encoding()</a> - Set current setting for character encoding conversion</li>
    <li class="member"><a href="function.ob-iconv-handler.php" class="function" rel="rdfs-seeAlso">ob_iconv_handler()</a> - Convert character encoding as output buffer handler</li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites