arrayutils
Search…
values()
The values() method return all the values of an array
Example.php
1
<?php use kim\present\utils\arrays\ArrayUtils;
2
3
$arrayUtils = ArrayUtils::from(["first" => 1, "second" => 2, "third" => 3]);
4
5
//Get all values
6
$arrayUtils->values();
7
// expected output: [1, 2, 3]
Copied!

Syntax

1
$arrayUtils->values() : ArrayUtils;
Copied!

Return value

  • A array of all the values in array.

Prefixing

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

References

PHP: array_values - Manual