|  | 
|  | 1 | +<?xml version="1.0" encoding="utf-8"?> | 
|  | 2 | +<!-- $Revision$ --> | 
|  | 3 | +<!-- EN-Revision: 85c47f89f35f927d7c7ad23235c830dc4b514ddd Maintainer: mumumu Status: ready --> | 
|  | 4 | +<refentry xml:id="function.array-first" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | 
|  | 5 | + <refnamediv> | 
|  | 6 | +  <refname>array_first</refname> | 
|  | 7 | +  <refpurpose>配列の最初の値を得る</refpurpose> | 
|  | 8 | + </refnamediv> | 
|  | 9 | + | 
|  | 10 | + <refsect1 role="description"> | 
|  | 11 | +  &reftitle.description; | 
|  | 12 | +  <methodsynopsis> | 
|  | 13 | +   <type>mixed</type><methodname>array_first</methodname> | 
|  | 14 | +   <methodparam><type>array</type><parameter>array</parameter></methodparam> | 
|  | 15 | +  </methodsynopsis> | 
|  | 16 | +  <para> | 
|  | 17 | +   与えられた <parameter>array</parameter> の最初の値を返します。 | 
|  | 18 | +  </para> | 
|  | 19 | + </refsect1> | 
|  | 20 | + | 
|  | 21 | + <refsect1 role="parameters"> | 
|  | 22 | +  &reftitle.parameters; | 
|  | 23 | +  <variablelist> | 
|  | 24 | +   <varlistentry> | 
|  | 25 | +    <term><parameter>array</parameter></term> | 
|  | 26 | +    <listitem> | 
|  | 27 | +     <para> | 
|  | 28 | +      入力となる配列 | 
|  | 29 | +     </para> | 
|  | 30 | +    </listitem> | 
|  | 31 | +   </varlistentry> | 
|  | 32 | +  </variablelist> | 
|  | 33 | + </refsect1> | 
|  | 34 | + | 
|  | 35 | + <refsect1 role="returnvalues"> | 
|  | 36 | +  &reftitle.returnvalues; | 
|  | 37 | +  <para> | 
|  | 38 | +   配列が空でなければ、 | 
|  | 39 | +   <parameter>array</parameter> の最初の値を返します。 | 
|  | 40 | +   そうでなければ、&null; を返します。 | 
|  | 41 | +  </para> | 
|  | 42 | + </refsect1> | 
|  | 43 | + | 
|  | 44 | + <refsect1 role="examples"> | 
|  | 45 | +  &reftitle.examples; | 
|  | 46 | +  <para> | 
|  | 47 | +   <example xml:id="array_first.example.basic"> | 
|  | 48 | +    <title>基本的な <function>array_first</function> 関数の使い方</title> | 
|  | 49 | +    <programlisting role="php"> | 
|  | 50 | +<![CDATA[ | 
|  | 51 | +<?php | 
|  | 52 | +$array = [1 => 'a', 0 => 'b', 3 => 'c', 2 => 'd']; | 
|  | 53 | +
 | 
|  | 54 | +$firstValue = array_first($array); | 
|  | 55 | +
 | 
|  | 56 | +var_dump($firstValue); | 
|  | 57 | +?> | 
|  | 58 | +]]> | 
|  | 59 | +    </programlisting> | 
|  | 60 | +    &example.outputs; | 
|  | 61 | +    <screen> | 
|  | 62 | +<![CDATA[ | 
|  | 63 | +string(1) "a" | 
|  | 64 | +]]> | 
|  | 65 | +    </screen> | 
|  | 66 | +   </example> | 
|  | 67 | +  </para> | 
|  | 68 | + </refsect1> | 
|  | 69 | + | 
|  | 70 | + <refsect1 role="seealso"> | 
|  | 71 | +  &reftitle.seealso; | 
|  | 72 | +  <simplelist> | 
|  | 73 | +   <member><function>array_key_first</function></member> | 
|  | 74 | +   <member><function>array_last</function></member> | 
|  | 75 | +  </simplelist> | 
|  | 76 | + </refsect1> | 
|  | 77 | + | 
|  | 78 | +</refentry> | 
|  | 79 | +<!-- Keep this comment at the end of the file | 
|  | 80 | +Local variables: | 
|  | 81 | +mode: sgml | 
|  | 82 | +sgml-omittag:t | 
|  | 83 | +sgml-shorttag:t | 
|  | 84 | +sgml-minimize-attributes:nil | 
|  | 85 | +sgml-always-quote-attributes:t | 
|  | 86 | +sgml-indent-step:1 | 
|  | 87 | +sgml-indent-data:t | 
|  | 88 | +indent-tabs-mode:nil | 
|  | 89 | +sgml-parent-document:nil | 
|  | 90 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" | 
|  | 91 | +sgml-exposed-tags:nil | 
|  | 92 | +sgml-local-catalogs:nil | 
|  | 93 | +sgml-local-ecat-files:nil | 
|  | 94 | +End: | 
|  | 95 | +vim600: syn=xml fen fdm=syntax fdl=2 si | 
|  | 96 | +vim: et tw=78 syn=sgml | 
|  | 97 | +vi: ts=1 sw=1 | 
|  | 98 | +--> | 
0 commit comments