★ wanayoo — archive 1999 http://fr.php.net/manual/function.array-values.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Arrays
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this pageDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
Arrays
* array
* array_count_values
* array_diff
* array_flip
* array_intersect
* array_keys
* array_merge
* array_merge_recursive
* array_multisort
* array_pad
* array_pop
* array_push
* array_rand
* array_reverse
* array_shift
* array_slice
* array_splice
* array_unique
* array_unshift
* array_values
* array_walk
* arsort
* asort
* compact
* count
* current
* each
* end
* extract
* in_array
* key
* krsort
* ksort
* list
* natsort
* natcasesort
* next
* pos
* prev
* range
* reset
* rsort
* shuffle
* sizeof
* sort
* uasort
* uksort
* usort

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: array_values
View the source code for this pageSearch the site



Previous page
 array_unshift
 Updated
Fri, 05 Jan 2001
array_walk 
Next page


array_values

(PHP 4 )

array_values -- Return all the values of an array

Description

array array_values (array input)

Array_values() returns all the values from the input array.

Example 1. Array_values() example


$array = array ("size" => "XL", "color" => "gold");
array_values ($array);    // returns array ("XL", "gold")
      

Note: This function was added to PHP 4, below is an implementation for those still using PHP 3.

Example 2. Implementation of array_values() for PHP 3 users


function array_values ($arr) {
    $t = array();
    while (list($k, $v) = each ($arr)) {
        $t[] = $v;
        return $t;
    }
}
       


 About Notes


Previous page
 array_unshift
 Updated
Fri, 05 Jan 2001
array_walk 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.