How can you access a specific value in an array in PHP?

To access a specific value in an array in PHP, you can use the array index corresponding to the value you want to retrieve. Array indexes start at 0 for the first element, so you can access the value at a specific index by specifying the index within square brackets after the array variable.

$array = [10, 20, 30, 40, 50];
$specificValue = $array[2]; // Accessing the value at index 2 (which is 30)
echo $specificValue; // Output: 30