How can a specific value be extracted from an array in PHP?

To extract a specific value from an array in PHP, you can use the array index corresponding to the value you want to extract. You can access the value by using the square brackets notation with the index inside them.

// Sample array
$array = ['apple', 'banana', 'cherry', 'date'];

// Extracting the value at index 1 (banana)
$specificValue = $array[1];

echo $specificValue; // Output: banana