Introduction to Arrays

This YouTube video was created by Steve Griffith.

What are Arrays

An array is an index list of values separated by commas. Arrays in PHP are similar to arrays in Javascript. They can also contain different data types include strings, numbers, and other arrays.

The biggest practical difference between arrays in Javascript and the PHP is that in PHP you MUST declare the array before you can add items to the array.

Types of Arrays

In PHP, there are two types of arrays: simple arrays and associative arrays. Continue to learn more about each type of array.