Tools, FAQ, Tutorials:
Retrieving All Values from an Array in PHP
How To Get All the Values Out of an Array in PHP?
✍: FYIcenter.com
Function array_values() returns a new array that contains all the values of a given array. Here is a PHP script on how to use array_values():
<?php $mixed = array(); $mixed["Zero"] = "PHP"; $mixed[1] = "Perl"; $mixed["Two"] = "Java"; $mixed["3"] = "C+"; $mixed[""] = "Basic"; $mixed[] = "Pascal"; $mixed[] = "FORTRAN"; $values = array_values($mixed); print("Values of the input array:\n"); print_r($values); ?>
This script will print:
Values of the input array: Array ( [0] => PHP [1] => Perl [2] => Java [3] => C+ [4] => Basic [5] => Pascal [6] => FORTRAN )
⇒ Sorting an Array by Keys in PHP
⇐ Retrieving All Keys from an Array in PHP
2017-01-21, 2026🔥, 0💬
Popular Posts:
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...
Where to find tutorials on Python programming language? I want to learn Python. Here is a large coll...