1
0
mirror of https://github.com/php/doc-pl.git synced 2026-04-30 02:03:11 +02:00
Files
archived-doc-pl/reference/array/functions/key.xml
T
Leszek Krupinski 7b1063ba47 [leszek] - updated to 1.9
git-svn-id: https://svn.php.net/repository/phpdoc/pl/trunk@180634 c90b9560-bf6c-de11-be94-00142212c4b1
2005-02-24 01:03:46 +00:00

71 lines
1.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.9 Maintainer: leszek Status: ready -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.key">
<refnamediv>
<refname>key</refname>
<refpurpose>Pobiera klucz z tablicy asocjacyjnej</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
<methodsynopsis>
<type>mixed</type><methodname>key</methodname>
<methodparam><type>array</type><parameter role="reference">tablica</parameter></methodparam>
</methodsynopsis>
<para>
<function>key</function> zwraza klucz bie¿±cego elementu z tablicy
asocjacyjnej.
</para>
<para>
<example>
<title>Przyk³ad u¿ycia funkcji <function>key</function></title>
<programlisting role="php">
<![CDATA[
<?php
$tablica = array(
'owoc1' => 'jab³ko',
'owoc2' => 'pomarañcza',
'owoc3' => 'winogrono',
'owoc4' => 'jab³ko',
'owoc5' => 'jab³ko');
// poni¿sza pêtla wy¶wietla wszystkie klucze w tablicy asocjacyjnej, gdzie
// warto¶æ jest równa "jab³ko"
while ($nazwa_owocu = current($tablica)) {
if ($nazwa_owocu == 'jab³ko') {
echo key($tablica).'<br />';
}
next($tablica);
}
?>
]]>
</programlisting>
</example>
</para>
<para>
Patrz tak¿e: <function>current</function> i <function>next</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->