PHP Array tutorial
Home - Tutorials - Basics
In this tutorial I will show you how to work with arrays in PHP. You will learn how to create, sort or print an array. Besides this we will touch on multidimensional arrays as well.
Tutorial info:
Name: | PHP Array tutorial |
Total steps: | 7 |
Category: | Basics |
Level: | Beginner |
Product: | See complete product |
Bookmark PHP Array tutorial
Step 1 - Introduction to arrays
PHP Array tutorial
Arrays are special data types. Despite of other normal variables an array can store more than one value. Let's suppose you want to store basic colors in your PHP script. You can construct a small list from them like this:
Color list:
- red
- green
- blue
- balck
- white
The array type exists exactly for such purposes. So let's see how to create an array to store our color list.
Next Step of PHP Array tutorial
Tags: array, php array, sort array, create array, print array, array length
<Back - Tutorial Index Next - Step 2> -->PHP Array tutorial - Table of contents |
---|
Step 1 - Introduction to arrays |
Step 2 - Creating an array |
Step 3 - Display the array content |
Step 4 - Associative arrays |
Step 5 - Multidimensional arrays |
Step 6 - Array functions |
Step 7 - Complete example code |