|
|
Php Array Values Display Function
|
Tutorials » Php »
|
Topic |
What is array_values Function?
|
|
Explanation |
|
The "array_values" function returns all the value of an array.
Syntax:
array_values(array)
In the above syntax "array" is the array from which all the values are displayed, but the keys
will be numeric starting with 0.
Example:
<?php
$a=array("a"=>"Orange","b"=>"Guava","c"=>"Apple");
print_r(array_values($a));
?>
Result:
Array ( [0]=> Orange [1]=> Guava [2]=> Apple);
In the above example all the values of array "$a" is displayed, with numeric keys starting from "0".
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|