Answers for "array values php function"

PHP
2

array values php

<?php
  
$array = array("size" => "XL", "color" => "gold");

print_r(array_values($array));

?>
Posted by: Guest on June-01-2020
0

array values php function

$fruits = ["m"=>"banana", "c"=>"Apple" , "a"=>"gray"];
$newArray = array_values($colors); //new Array with values $fruits array
echo "<pre>";
print_r( $newArray );



//output
Array
(
    [0] => banana
    [1] => gray
    [2] => blue
    [3] => num
)
Posted by: Guest on June-23-2021

Browse Popular Code Answers by Language