values()

The values() method return all the values of an array

Example.php
<?php use kim\present\utils\arrays\ArrayUtils;

$arrayUtils = ArrayUtils::from(["first" => 1, "second" => 2, "third" => 3]);

//Get all values
$arrayUtils->values();
// expected output: [1, 2, 3]

Syntax

$arrayUtils->values() : ArrayUtils;

Return value

  • A array of all the values in array.

Prefixing

$arrayUtils->valuesAs() : array;
ArrayUtils::valuesFrom(iterable $from) : ArrayUtils;
ArrayUtils::valuesFromAs(iterable $from) : array;

References

Last updated