1
0
mirror of https://github.com/php/doc-tr.git synced 2026-03-26 08:12:09 +01:00
Files
archived-doc-tr/reference/array/functions/in-array.xml
Nilgün Belma Bugüner 568f94a55f changed EN-Revision tag as cvs2svn
fixed svn properties

git-svn-id: https://svn.php.net/repository/phpdoc/tr/trunk@283852 c90b9560-bf6c-de11-be94-00142212c4b1
2009-07-11 10:54:55 +00:00

211 lines
4.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 876c81c602fe21a5404b74ed5e412198f632eac0 Maintainer: nilgun Status: ready -->
<refentry xml:id="function.in-array" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>in_array</refname>
<refpurpose>Bir dizide bir değerin varlığını araştırır</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>in_array</methodname>
<methodparam><type>mixed</type><parameter>iğne</parameter></methodparam>
<methodparam><type>array</type><parameter>samanlık</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>strict</parameter></methodparam>
</methodsynopsis>
<para>
<parameter>samanlık</parameter>'ta <parameter>iğne</parameter>'yi' arar.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>iğne</parameter></term>
<listitem>
<para>
Aranan değer.
</para>
<note>
<para>
<parameter>iğne</parameter> bir dizge ise harf büyüklüğüne duyarlı
karşılaştırma uygulanır.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>samanlık</parameter></term>
<listitem>
<para>
Dizi.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>türüne_de_bak</parameter></term>
<listitem>
<para>
Bu değiştirgede &true; belirtilmişse <function>in_array</function>
işlevi <parameter>samanlık</parameter> içindeki
<parameter>iğne</parameter>'nin <link
linkend="language.types">türüne</link> de bakacaktır.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<parameter>iğne</parameter> bulunursa &true;, aksi takdirde &false; döner.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.2.0</entry>
<entry>
<parameter>iğne</parameter> olarak bir dizi belirtilebilir oldu.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>- <function>in_array</function> örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo "Irix var";
}
if (in_array("mac", $os)) {
echo "Mac var";
}
?>
]]>
</programlisting>
<para>
The second condition fails because <function>in_array</function> işlevi
harf büyüklüğüne duyarlı olduğundan ikinci koşul başarısız olur ve sonuç
şu olur:
</para>
<screen>
<![CDATA[
Irix var
]]>
</screen>
</example>
</para>
<para>
<example>
<title>- Türe de bakan <function>in_array</function> örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$a = array('1.10', 12.4, 1.13);
if (in_array('12.4', $a, true)) {
echo "'12.4' uygun türde bulundu\n";
}
if (in_array(1.13, $a, true)) {
echo "1.13 uygun türde bulundu\n";
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
1.13 uygun türde bulundu
]]>
</screen>
</example>
</para>
<para>
<example>
<title>- iğnenin bir dizi olduğu <function>in_array</function> örneği
</title>
<programlisting role="php">
<![CDATA[
<?php
$a = array(array('p', 'h'), array('p', 'r'), 'o');
if (in_array(array('p', 'h'), $a)) {
echo "'ph' bulundu\n";
}
if (in_array(array('f', 'i'), $a)) {
echo "'fi' bulundu\n";
}
if (in_array('o', $a)) {
echo "'o' bulundu\n";
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
'ph' bulundu
'o' bulundu
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>array_search</function></member>
<member><function>isset</function></member>
<member><function>array_key_exists</function></member>
</simplelist>
</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
-->