mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Indentation.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30748 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1779d1b8dd
commit
aa03eb671d
2 changed files with 84 additions and 72 deletions
|
@ -1102,7 +1102,9 @@ array_walk ($fruits, 'test_print');
|
|||
<funcprototype>
|
||||
<funcdef>void <function>arsort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>sort_flags</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1669,7 +1671,9 @@ if (in_array ("Irix", $os))
|
|||
<funcprototype>
|
||||
<funcdef>int <function>krsort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>sort_flags</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1724,7 +1728,9 @@ fruits[a] = orange
|
|||
<funcprototype>
|
||||
<funcdef>int <function>ksort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>sort_flags</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
|
@ -1787,7 +1793,7 @@ fruits[d] = lemon
|
|||
but a language construct. <function>list</function> is used to
|
||||
assign a list of variables in one operation.
|
||||
<example>
|
||||
<title><function>list</function> example</title>
|
||||
<title><function>List</function> example</title>
|
||||
<programlisting role="php">
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -1993,14 +1999,16 @@ while (list ($id, $name, $salary) = mysql_fetch_row ($result)) {
|
|||
<funcprototype>
|
||||
<funcdef>void <function>rsort</function></funcdef>
|
||||
<paramdef>array <parameter>array</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>sort_flags</optional></parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>sort_flags</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
This function sorts an array in reverse order (highest to lowest).
|
||||
<example>
|
||||
<title><function>Rsort</function> example</title>
|
||||
<programlisting role="php">
|
||||
<programlisting role="php">
|
||||
$fruits = array ("lemon", "orange", "banana", "apple");
|
||||
rsort ($fruits);
|
||||
reset ($fruits);
|
||||
|
@ -2142,10 +2150,10 @@ fruits[3] = orange
|
|||
<para>
|
||||
The fruits have been sorted in alphabetical order.
|
||||
</para>
|
||||
<para>
|
||||
The optional second parameter <parameter>sort_flags</parameter>
|
||||
<para>
|
||||
The optional second parameter <parameter>sort_flags</parameter>
|
||||
may be used to modify the sorting behavior using theese valies:
|
||||
</para>
|
||||
</para>
|
||||
<para>
|
||||
Sorting type flags:
|
||||
<itemizedlist>
|
||||
|
@ -2193,12 +2201,12 @@ fruits[3] = orange
|
|||
is user-defined.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Please see <function>usort</function> and
|
||||
<function>uksort</function> for examples of user-defined
|
||||
comparison functions.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Please see <function>usort</function> and
|
||||
<function>uksort</function> for examples of user-defined
|
||||
comparison functions.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also: <function>usort</function>, <function>uksort</function>,
|
||||
<function>sort</function>, <function>asort</function>,
|
||||
|
@ -2333,15 +2341,17 @@ while (list ($key, $value) = each ($a)) {
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Obviously in this trivial case the <function>rsort</function>
|
||||
function would be more appropriate.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
Obviously in this trivial case the <function>rsort</function>
|
||||
function would be more appropriate.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>Usort</function> example using mulit-dimensional array</title>
|
||||
<title>
|
||||
<function>Usort</function> example using multi-dimensional array
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
function cmp ($a, $b) {
|
||||
return strcmp($a["fruit"],$b["fruit"]);
|
||||
|
@ -2360,7 +2370,8 @@ while (list ($key, $value) = each ($fruits)) {
|
|||
</example>
|
||||
</para>
|
||||
<para>
|
||||
When sorting a multi-dimensional array, $a and $b contain references to the first index of the array.
|
||||
When sorting a multi-dimensional array, $a and $b contain
|
||||
references to the first index of the array.
|
||||
</para>
|
||||
<para>
|
||||
This example would display:
|
||||
|
|
|
@ -708,131 +708,131 @@ echo strftime ("Last day in Feb 2000 is: %d", $lastday);
|
|||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%a - abbreviated weekday name according to the current locale
|
||||
%a - abbreviated weekday name according to the current locale
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%A - full weekday name according to the current locale
|
||||
%A - full weekday name according to the current locale
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%b - abbreviated month name according to the current locale
|
||||
%b - abbreviated month name according to the current locale
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%B - full month name according to the current locale
|
||||
%B - full month name according to the current locale
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%c - preferred date and time representation for the current
|
||||
locale
|
||||
%c - preferred date and time representation for the current
|
||||
locale
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%C - century number (the year divided by 100 and truncated
|
||||
to an integer, range 00 to 99)
|
||||
%C - century number (the year divided by 100 and truncated to
|
||||
an integer, range 00 to 99)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%d - day of the month as a decimal number (range 00 to 31)
|
||||
%d - day of the month as a decimal number (range 00 to 31)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%D - same as %m/%d/%y
|
||||
%D - same as %m/%d/%y
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%e - day of the month as a decimal number, a single digit is
|
||||
preceded by a space (range ' 1' to '31')
|
||||
%e - day of the month as a decimal number, a single digit is
|
||||
preceded by a space (range ' 1' to '31')
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%h - same as %b
|
||||
%h - same as %b
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%H - hour as a decimal number using a 24-hour clock
|
||||
(range 00 to 23)
|
||||
%H - hour as a decimal number using a 24-hour clock (range 00
|
||||
to 23)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%I - hour as a decimal number using a 12-hour clock
|
||||
(range 01 to 12)
|
||||
%I - hour as a decimal number using a 12-hour clock (range 01
|
||||
to 12)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%j - day of the year as a decimal number (range 001 to 366)
|
||||
%j - day of the year as a decimal number (range 001 to 366)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%m - month as a decimal number (range 1 to 12)
|
||||
%m - month as a decimal number (range 1 to 12)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%M - minute as a decimal number
|
||||
%M - minute as a decimal number
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%n - newline character
|
||||
%n - newline character
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%p - either `am' or `pm' according to the given time value, or
|
||||
the corresponding strings for the current locale
|
||||
%p - either `am' or `pm' according to the given time value, or
|
||||
the corresponding strings for the current locale
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%r - time in a.m. and p.m. notation
|
||||
%r - time in a.m. and p.m. notation
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%R - time in 24 hour notation
|
||||
%R - time in 24 hour notation
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%S - second as a decimal number
|
||||
%S - second as a decimal number
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%t - tab character
|
||||
%t - tab character
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%T - current time, equal to %H:%M:%S
|
||||
%T - current time, equal to %H:%M:%S
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%u - weekday as a decimal number [1,7],
|
||||
with 1 representing Monday
|
||||
%u - weekday as a decimal number [1,7], with 1 representing
|
||||
Monday
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%U - week number of the current year as a decimal number,
|
||||
starting with the first Sunday as the first day of the first
|
||||
week
|
||||
%U - week number of the current year as a decimal number,
|
||||
starting with the first Sunday as the first day of the first
|
||||
week
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -845,47 +845,47 @@ echo strftime ("Last day in Feb 2000 is: %d", $lastday);
|
|||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%W - week number of the current year as a decimal number,
|
||||
starting with the first Monday as the first day of the first
|
||||
week
|
||||
%W - week number of the current year as a decimal number,
|
||||
starting with the first Monday as the first day of the first
|
||||
week
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%w - day of the week as a decimal, Sunday being 0
|
||||
%w - day of the week as a decimal, Sunday being 0
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%x - preferred date representation for the current locale
|
||||
without the time
|
||||
%x - preferred date representation for the current locale
|
||||
without the time
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%X - preferred time representation for the current locale
|
||||
without the date
|
||||
%X - preferred time representation for the current locale
|
||||
without the date
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%y - year as a decimal number without a century
|
||||
(range 00 to 99)
|
||||
%y - year as a decimal number without a century (range 00 to
|
||||
99)
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%Y - year as a decimal number including the century
|
||||
%Y - year as a decimal number including the century
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%Z - time zone or name or abbreviation
|
||||
%Z - time zone or name or abbreviation
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
%% - a literal `%' character
|
||||
%% - a literal `%' character
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
@ -902,13 +902,14 @@ setlocale ("LC_TIME", "de_DE");
|
|||
print (strftime ("%A.\n"));
|
||||
</programlisting>
|
||||
</example>
|
||||
This example works if you have the respective locales installed
|
||||
in your system.
|
||||
This example works if you have the respective locales installed
|
||||
in your system.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>setlocale</function> and
|
||||
<function>mktime</function> and the <ulink url="&spec.strftime;">
|
||||
Open Group specification of <function>strftime()</function></ulink>.
|
||||
Open Group specification of
|
||||
<function>strftime</function></ulink>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue