PHP Arrays: How to create an array in PHP

Arrays in PHP can be created usning array() declaration as follows:

$new_array = array();

This would create a new empty array. To create an array with initial values,

$new_array = array(1, 2);

$str_array = array("Jose", "Andy");

This creates 2 arrays $new_array and $str_array with element 1,2 and "Jose", "Andy" respectively.