cvs: phpdoc-hu /reference/array/functions array-key-exists.xml
| From: | Cece) Szabolcs | Date: | Thu, 05 Aug 2004 16:06:59 +0000 |
| Subject: | cvs: phpdoc-hu /reference/array/functions array-key-exists.xml | ||
| Groups: | php.doc.hu | ||
| Request: | Send a blank email to doc-hu+get-869@lists.php.net to get a copy of this message | ||
cece Thu Aug 5 12:06:59 2004 EDT
Modified files:
/phpdoc-hu/reference/array/functions array-key-exists.xml
Log:
sync
http://cvs.php.net/diff.php/phpdoc-hu/reference/array/functions/array-key-exists.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc-hu/reference/array/functions/array-key-exists.xml
diff -u phpdoc-hu/reference/array/functions/array-key-exists.xml:1.4
phpdoc-hu/reference/array/functions/array-key-exists.xml:1.5
--- phpdoc-hu/reference/array/functions/array-key-exists.xml:1.4 Tue Aug 3 19:28:05 2004
+++ phpdoc-hu/reference/array/functions/array-key-exists.xml Thu Aug 5 12:06:59 2004
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- splitted from ./hu/functions/array.xml, last change in rev 1.3 -->
<!-- last change to 'array-key-exists' in en/ tree in rev 1.119 -->
-<!-- EN-Revision: 1.8 Maintainer: gerzson Status: ready -->
+<!-- EN-Revision: 1.10 Maintainer: cece Status: ready -->
+<!-- CREDITS: gerzson -->
<!-- OLD-Revision: 1.173/EN.1.119 -->
<refentry id="function.array-key-exists">
<refnamediv>
@@ -16,10 +17,11 @@
<methodparam><type>array</type><parameter>search</parameter></methodparam>
</methodsynopsis>
<para>
- Az <function>array_key_exists</function> &true;-val tér vissza, ha
+ Az <function>array_key_exists</function> &true; válasszal tér vissza, ha
az adott <parameter>key</parameter> be van állítva a
<parameter>search</parameter> tömbben. A <parameter>key</parameter>
bármilyen
- lehetséges tömbindex érték lehet.
+ lehetséges tömbindex érték lehet. Az <function>array_key_exists</function>
+ objektumokkal is tud dolgozni.
</para>
<para>
<example>
@@ -27,8 +29,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$keress = array("elsõ" => 1, "második" => 4);
-if ( array_key_exists("elsõ", $keress) ) {
+$keress = array('elsõ' => 1, 'második' => 4);
+if ( array_key_exists('elsõ', $keress) ) {
echo "Az 'elsõ' indexû elem a tömbben van.";
}
?>
@@ -41,6 +43,27 @@
A PHP 4.0.6-ban a függvény neve <function>key_exists</function> volt.
</simpara>
</note>
+ <example>
+ <title>Az <function>array_key_exists</function> és az
<function>isset</function> összehasonlítása</title>
+ <para>
+ Az <function>isset</function> nem ad &true; értéket olyan
+ tömbmutatókra, amelyek &null; értékre mutatbak, míg az
+ <function>array_key_exists</function> megteszi ezt nekünk.
+ </para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$keress = array('elsõ' => null, 'második' => 4);
+
+// ez a kifejezés hamis lesz
+isset($keress['elsõ'])
+
+// ez viszont igaz
+array_key_exists('elsõ', $keress);
+?>
+]]>
+ </programlisting>
+ </example>
<para>
Lásd még:
<function>isset</function>,