Files
doc-fr/reference/array/functions/array-key-exists.xml
Damien Seguy ea42f58b58 turning entites into chars
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@147452 c90b9560-bf6c-de11-be94-00142212c4b1
2003-12-29 17:04:50 +00:00

71 lines
2.0 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./fr/functions/array.xml, last change in rev 1.44 -->
<refentry id="function.array-key-exists">
<refnamediv>
<refname>array_key_exists</refname>
<refpurpose>Vérifie si une clé existe dans un tableau</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>array_key_exists</methodname>
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
<methodparam><type>array</type><parameter>search</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_key_exists</function> retourne &true; s'il existe une
clé du nom de <parameter>key</parameter> dans le tableau
<parameter>search</parameter>. <parameter>key</parameter>
peut être n'importe quelle valeur valide d'index
de tableau.
</para>
<para>
<example>
<title>Exemple avec <function>array_key_exists</function></title>
<programlisting role="php">
<![CDATA[
<?php
$search_array = array("premier" => 1, "second" => 4);
if (array_key_exists("premier", $search_array)) {
echo "L'élément 'premier' existe dans le tableau";
}
?>
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
Cette fonction s'appelait <function>key_exists</function> en &php; version 4.0.6.
</simpara>
</note>
<para>
Voir aussi
<function>isset</function>,
<function>array_keys</function> et
<function>in_array</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
-->