Change language

PHP Ds / Map values ​​() function

Syntax:
DsSequence public DsMap::values ​​(void)
Parameters: this function takes no parameters.Returned value:Returns a Ds / Sequence containing all the map values.The programs below illustrate the Ds function / Map::values ​​()in PHP:Program 1:  
// Declare a new map $map = new DsMap ([ " a " = > " Geeks " , " b " = > " for " , "c" = > "Geeks" ]); print_r ( $map -> values ​​());  
// Declare another new map $map = new DsMap ([ " b " = > " Computer " , "e" = > "Science" , " f " = > " Portal " ]) ; print_r ( $map -> values ​​());  
?>
Exit:
DsVector Object ( [0] = > Geeks [1] = > for [2] = > Geeks) DsVector Object ([0] = > Computer [1] = > Science [2] = > Portal)  Program 2:        
// Declare a new map $map = new DsMap ([ "Geeks1" = > "computer" , "Geeks2" = > "science" , "Geeks3" = > 5,
"Geeks4" = > twenty]); var_dump ( $map -> values ​​());  
// Declare another new map $map = new DsMap ([ " x " = > " A " , "y" = > "B" , "z" = > "C" ]); var_dump ( $map -> values ​​());  
?>
Exit:
object (DsVector ) # 2 (4) {[0] = > string (8) "computer" [1] = > string (7) "science" [2] = > int (5) [3] = > int (20)} object (DsVector) # 1 (3) {[0] = > string (1) "A" [1] = > string (1) "B" [2] = > string (1) "C"}
Link: https://www.php.net/manual/en/ds-map.values.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method