<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.geoip.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.geoip-region-name-by-code.php',
    1 => 'geoip_region_name_by_code',
    2 => 'Returns the region name for some country and region code combo',
  ),
  'up' => 
  array (
    0 => 'ref.geoip.php',
    1 => 'Функції GeoIP',
  ),
  'prev' => 
  array (
    0 => 'function.geoip-region-by-name.php',
    1 => 'geoip_region_by_name',
  ),
  'next' => 
  array (
    0 => 'function.geoip-setup-custom-directory.php',
    1 => 'geoip_setup_custom_directory',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/geoip/functions/geoip-region-name-by-code.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.geoip-region-name-by-code" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">geoip_region_name_by_code</h1>
  <p class="verinfo">(PECL geoip &gt;= 1.0.4)</p><p class="refpurpose"><span class="refname">geoip_region_name_by_code</span> &mdash; <span class="dc-title">Returns the region name for some country and region code combo</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.geoip-region-name-by-code-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>geoip_region_name_by_code</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$country_code</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$region_code</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>


  <p class="para rdfs-comment">
   The <span class="function"><strong>geoip_region_name_by_code()</strong></span> function will return the region
   name corresponding to a country and region code combo.
  </p>
  <p class="para">
   In the United States, the region code corresponds to the two-letter abbreviation
   of each state. In Canada, the region code corresponds to the two-letter province or
   territory code as attributed by Canada Post.
  </p>
  <p class="para">
   For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions.
   You can check <a href="http://www.maxmind.com/app/fips10_4" class="link external">&raquo;&nbsp;http://www.maxmind.com/app/fips10_4</a>
   for a detailed list of FIPS 10-4 codes.
  </p>
  <p class="para">
   This function is always available if using GeoIP Library version 1.4.1 or newer. The
   data is taken directly from the GeoIP Library and not from any database.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.geoip-region-name-by-code-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">country_code</code></dt>
     <dd>
      <p class="para">
       The two-letter country code (see
       <span class="function"><a href="function.geoip-country-code-by-name.php" class="function">geoip_country_code_by_name()</a></span>)
      </p>
     </dd>
    
    
     <dt><code class="parameter">region_code</code></dt>
     <dd>
      <p class="para">
       The two-letter (or digit) region code (see 
       <span class="function"><a href="function.geoip-region-by-name.php" class="function">geoip_region_by_name()</a></span>)
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.geoip-region-name-by-code-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns the region name on success, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the country and region code
   combo cannot be found.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.geoip-region-name-by-code-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 A <span class="function"><strong>geoip_region_name_by_code()</strong></span> example using region code for US/Canada</strong></p>
    <div class="example-contents"><p>
     This will print the region name for country CA (Canada), region QC (Quebec).
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$region </span><span style="color: #007700">= </span><span style="color: #0000BB">geoip_region_name_by_code</span><span style="color: #007700">(</span><span style="color: #DD0000">'CA'</span><span style="color: #007700">, </span><span style="color: #DD0000">'QC'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$region</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'Region name for CA/QC is: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$region</span><span style="color: #007700">;<br />}<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="examplescode"><pre class="examplescode">Region name for CA/QC is: Quebec</pre>
</div>
    </div>
   </div>
   <div class="example" id="example-2">
    <p><strong>Приклад #2 A <span class="function"><strong>geoip_region_name_by_code()</strong></span> example using FIPS codes</strong></p>
    <div class="example-contents"><p>
     This will print the region name for country JP (Japan), region 01.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$region </span><span style="color: #007700">= </span><span style="color: #0000BB">geoip_region_name_by_code</span><span style="color: #007700">(</span><span style="color: #DD0000">'JP'</span><span style="color: #007700">, </span><span style="color: #DD0000">'01'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$region</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'Region name for JP/01 is: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$region</span><span style="color: #007700">;<br />}<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="examplescode"><pre class="examplescode">Region name for JP/01 is: Aichi</pre>
</div>
    </div>
   </div>
  </p>
 </div>


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