Arrays in PHP: Storing and Manipulating Data
☰Fullscreen
Table of Content:
An array stores multiple values in one single variable.
In the following example $cars is an array. The PHP var_dump() function returns the data type and value:
Example Code:
Output:
The above code will produce the following result-
array(3) { [0]=> string(3) "Ram" [1]=> string(5) "Shyam" [2]=> string(4) "Zodu" }
Code: Array Traversing
"; } ?>
Output:
The above code will produce the following result-
12 24 3 64 5