What is the correct syntax for defining arrays in PHP?

In PHP, arrays can be defined using the array() function or using square brackets []. The correct syntax for defining arrays in PHP is to use the array() function with key-value pairs for associative arrays, or without key-value pairs for indexed arrays. It is important to note that PHP is a loosely typed language, so arrays can contain a mix of data types.

// Indexed array
$fruits = array("apple", "banana", "orange");

// Associative array
$person = array("name" => "John", "age" => 30, "city" => "New York");