Blog de programación, errores, soluciones

Chose Language:
Author: Admin/Publisher |finished | checked

PHP array_values function

This PHP function will return all the values of the array in an indexed array.

Description / Descripción
array_values(array $array): array
Sintaxis / Sintax
$iarray = array_values($array_to_be_processed);


$array – This is the array from which we will obtain its values, and it can be an associative array. In fact, this is the situation where the function makes sense.


An indexed array containing the values from the previous array.


$caracteristicas_auto = [
    "marca" => "Toyota",
    "modelo" => "Camry",
    "año" => 2022,
    "color" => "Azul",
    "motor" => "2.5L",
    "tracción" => "Delantera"
array(6) {
  string(6) "Toyota"
  string(5) "Camry"
  string(4) "Azul"
  string(4) "2.5L"
  string(9) "Delantera"
Category: en-php
Something wrong? If you found an error or mistake in the content you can contact me on Twitter | @luisg2249_luis.
Last 4 post in same category