PHP code to get the only values from an associative array
<?php
//array with keys and values
$arr = array("name" => "Amit", "age" => 21, "Gender" => "Male");
//creating a new array with values of $arr
$new_arr = array_values($arr);
//printing new array
print_r ($new_arr);
?>
PHP code to get the only values from an associative array
Output
need an explanation for this answer? contact us directly to get an explanation for this answer