Gold Vision Communications / USA
 GOLDVISION.COM
Serving the Multimedia Community since 1989.
English Site | German Site 

 Web Hosting

 Virtual Dedicated Servers

 Chequeo de dominio

 Haga su pedido

 Estado del pedido

 Support

 Contáctenos

 Download

 Network

 Network Status

 Webdesign / Templates

 Efectuar pago

 Terms & Conditions

 Imprimir

 Notas Legales

 Declaración de Privacidad
  PHP / array_values
array_values

array_values

(PHP 4 >= 4.0.0)

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");
print_r(array_values ($array));

This will output:
Array
(
    [0] => XL
    [1] => 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;
}

See also array_keys().


© 1998-2007 Gold Vision Communications All Rights Reserved.