Answers for "how to print all value of array by passing any key in php"

PHP
6

php all keys in array

<?php
$array = array(
    'fruit1' => 'apple',
    'fruit2' => 'orange',
    'fruit3' => 'grape',
    'fruit4' => 'apple',
    'fruit5' => 'apple');

$keys = array_keys($array);		// return array
$values = array_values($array);	// return array
?>
Posted by: Guest on April-29-2020
0

php get array key

<?php
$array = array(
    'fruit1' => 'apple',
    'fruit2' => 'orange',
    'fruit3' => 'grape',
Posted by: Guest on April-01-2020

Code answers related to "how to print all value of array by passing any key in php"

Browse Popular Code Answers by Language