1
0
mirror of https://github.com/php/doc-tr.git synced 2026-04-26 16:38:05 +02:00
Files
archived-doc-tr/reference/array/functions/in-array.xml
T
2021-03-12 23:06:10 +03:00

188 lines
4.4 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: 68a9c82e06906a5c00e0199307d87dd3739f719b 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>sıkı</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
<parameter>sıkı</parameter> &true; olmadıkça gevşek karşılaştırma kullanarak
<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>sıkı</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="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>
<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:"~/.phpdoc/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
-->