How can you extract a specific value 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 retrieve. You can access the value by specifying the key of the element you want to extract from the array.

<?php
// Sample array
$colors = array("red", "green", "blue");

// Extracting the value at index 1 (green)
$specificValue = $colors[1];

echo $specificValue; // Output: green
?>