Arrays are what tables are to C-based programming languages and what databases are for SQL-based languages. Arrays or tables as they are sometimes called can be used to store the contents of several variables and to create one, you use the following syntax:
Array(key=>value)
The array in the syntax refers to the name of the array being created, the key is the index which is set automatically to a numeric character or string if none is specified. Value is the assigned value or content of the said array which can be seen easily in the following array creation example:
$b=array('z'=>‘Comedy”,’y'=>”Horror”,’x;’=>”Action”);
print_r($b);
?>This piece of code would produce an output of:
Array ([0] => Comedy [1] => Horror [2] => Action)