mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Removed php3 example, and added php tags.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129440 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
bd220a42f3
commit
5fee473d55
1 changed files with 3 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.array-values">
|
||||
<refnamediv>
|
||||
|
@ -22,8 +22,10 @@
|
|||
<title><function>array_values</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$array = array ("size" => "XL", "color" => "gold");
|
||||
print_r(array_values ($array));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
|
@ -40,29 +42,6 @@ Array
|
|||
</para>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This function was added to PHP 4, below is an implementation for
|
||||
those still using PHP 3.
|
||||
<example>
|
||||
<title>
|
||||
Implementation of <function>array_values</function> for PHP 3
|
||||
users
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
function array_values ($arr) {
|
||||
$t = array();
|
||||
while (list($k, $v) = each ($arr)) {
|
||||
$t[] = $v;
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>array_keys</function>.
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue