How can you retrieve different indexes from arrays in PHP?
To retrieve different indexes from arrays in PHP, you can use the array index notation to access specific elements in the array. Simply specify the index of the element you want to retrieve within square brackets after the array variable name.
$myArray = [10, 20, 30, 40, 50];
// Retrieve the element at index 2
$elementAtIndex2 = $myArray[2];
echo $elementAtIndex2; // Output: 30
// Retrieve the element at index 4
$elementAtIndex4 = $myArray[4];
echo $elementAtIndex4; // Output: 50