From the course: PHP Essential Training
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Associative arrays - PHP Tutorial
From the course: PHP Essential Training
Associative arrays
- PHP has another type of array called an Associative Array. And it's important for us to learn how to use both types, and to understand the difference between them. An Associative Array is an object indexed collection of objects. Now, it's very similar to what we saw for the definition of a regular array but notice that it doesn't say that it's ordered anymore. And instead of being integer indexed, it is object indexed. That is they're going to be indexed by a label of some sort, let's remember the expanding file folder metaphor that I gave you when we were talking about a arrays Associative Arrays are similar, but they work more like hanging file folders. They're not in any certain order and they can be rearranged. Each of those file folders is going to have a label on it. And that's how we're going to find information. Since we won't know what order the information is in. Instead we will thumb through those file folders…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Variables7m 50s
-
(Locked)
Strings4m 38s
-
(Locked)
String functions8m 53s
-
(Locked)
Numbers, part 1: Integers6m 27s
-
(Locked)
Numbers, part 2: Floating points5m 25s
-
(Locked)
Arrays10m
-
(Locked)
Associative arrays6m 37s
-
(Locked)
Array functions6m 33s
-
(Locked)
Booleans3m 50s
-
(Locked)
NULL and empty5m 15s
-
(Locked)
Type juggling and casting8m 27s
-
(Locked)
Constants4m 43s
-
(Locked)
-
-
-
-
-