Indentation in examples should be 4 spaces.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32291 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-09-09 00:27:28 +00:00
parent 09cfe326ae
commit bf5feb767c

View file

@ -249,29 +249,29 @@ array_keys ($array, "blue"); // returns array (0, 3, 4)
</programlisting>
</example>
</para>
<note>
<para>
This function was added to PHP4, below is an implementation for
those still using PHP3.
<example>
<title>
Implementation of <function>array_keys</function> for
PHP3 users
</title>
<programlisting role="php">
function array_keys($arr, $term="") {
$t = array();
while (list($k,$v) = each($arr)) {
if ($term &amp;&amp; $v != $term)
continue;
$t[] = $k;
}
return $t;
<note>
<para>
This function was added to PHP4, below is an implementation for
those still using PHP3.
<example>
<title>
Implementation of <function>array_keys</function> for PHP3
users
</title>
<programlisting role="php">
function array_keys ($arr, $term="") {
$t = array();
while (list($k,$v) = each($arr)) {
if ($term &amp;&amp; $v != $term)
continue;
$t[] = $k;
}
return $t;
}
</programlisting>
</example>
</para>
</note>
</programlisting>
</example>
</para>
</note>
<para>
See also <function>array_values</function>.
</para>
@ -1027,26 +1027,27 @@ array_values ($array); // returns array ("XL", "gold")
</programlisting>
</example>
</para>
<note>
<para>
This function was added to PHP4, below is an implementation for
those still using PHP3.
<example>
<title>
Implementation of <function>array_values</function> for
PHP3 users
</title>
<programlisting role="php">
function array_values($arr) {
$t = array();
while (list($k,$v) = each($arr))
$t[] = $v;
return $t;
<note>
<para>
This function was added to PHP4, below is an implementation for
those still using PHP3.
<example>
<title>
Implementation of <function>array_values</function> for PHP3
users
</title>
<programlisting role="php">
function array_values ($arr) {
$t = array();
while (list($k, $v) = each ($arr)) {
$t[] = $v;
return $t;
}
}
</programlisting>
</example>
</para>
</note>
</programlisting>
</example>
</para>
</note>
</refsect1>
</refentry>
@ -1111,11 +1112,11 @@ function array_values($arr) {
$fruits = array ("d"=&gt;"lemon", "a"=&gt;"orange", "b"=&gt;"banana", "c"=&gt;"apple");
function test_alter (&amp;$item1, $key, $prefix) {
$item1 = "$prefix: $item1";
$item1 = "$prefix: $item1";
}
function test_print ($item2, $key) {
echo "$key. $item2&lt;br&gt;\n";
echo "$key. $item2&lt;br&gt;\n";
}
array_walk ($fruits, 'test_print');