How can array values be accessed in PHP?

To access array values in PHP, you can use square brackets [] with the index of the element you want to access. The index can be a numeric key or a string key. If you want to access a specific element in a multidimensional array, you can use multiple square brackets with the respective indices. Example:

$array = [1, 2, 3, 4, 5];
echo $array[2]; // Output: 3

$associativeArray = ['key1' => 'value1', 'key2' => 'value2'];
echo $associativeArray['key2']; // Output: value2

$multiArray = [['a', 'b'], ['c', 'd']];
echo $multiArray[1][0]; // Output: c