PHP multidimensional array


Home - Tutorials - Basics

In this smal tutorial I will show you how to create and manage multidimensional arrays in PHP.

Tutorial info:


Name:PHP multidimensional array
Total steps:3
Category:Basics
Level:Beginner

Bookmark PHP multidimensional array



Bookmark and Share

Step 1 - Introduction


PHP multidimensional array


As you know arrays are a list of key and value pairs. In general the key used to be a number ( or a string in case of associative arrays ) and the value is any data type. And that is important as it means that a value can be an other array as well. So if you create an aeeay where the values are arrays as well then you made a multidimensional array. Of course the values in this internal array can be again a new array and so on.

Let's see an example. Suppose you want to store user informations. In this case you have a lot of users and each user has more properties like name, age, email, website and so on.






Next Step of PHP multidimensional array


Tags: php multidimensional array, multidimensional array, array, multi-dimensional array



Follow phpf1 on Twitter




F1 Site Family
AJAX F1
CSS F1
Database F1
HTML F1
Java F1
JavaScript F1
PHP F1

Total time: 0.1027