PHP Programing language

array_values() Function in PHP
Previous Home Next

array_values()

The array_values() function returns an array containing all the values of an array.

Syntax:
array_values(array)

In above syntax, "array" specifying an array.

Example:

<?php
$a=array("Name"=>"John","Age"=>"54","Country"=>"India");
print_r(array_values($a));
?>

Output:

Array ( [0] => John [1] => 54 [2] => India )

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: