PHP Syntax Datatypes Compound Array

 

- Info:

- Array datatypes can contain multiple items.

- Each item has key/index which can be numericla or associative.

 

- Example:

- Create PHP Console Application Test.php.

 

Test.php

<?php

//NUMERICAL INDEX.

$state[0] = "Alabama";

$state[1] = "Alaska";

//ASSOCIATIVE INDEX.

$state["Alabama"] = "Montgomery";

$state["Alaska" ] = "Juneau";

?>