+++ title = "Arrays" description = "Time to make a list" tags = ["php", "array", "list"] slug = "arrays" previous = "loops.html" next = "functions.html" +++ In PHP, arrays are used to store a list of items in a single variable. There are two ways to create an array. First, you can use the `array` construct to pass in values separated by commas and it will return an array. ```php 'Toyota', 'model' => 'Camry']; ``` To access the value in an associative array, just use the string key in brackets after the variable name. ```php echo $car['model'] . "\n"; ```