How can one access individual elements in an array in PHP?
To access individual elements in an array in PHP, you can use square brackets [] with the index of the element you want to access. The index starts at 0 for the first element in the array. Simply specify the array variable followed by the index inside the square brackets to retrieve the desired element.
// Define an array
$array = [10, 20, 30, 40, 50];
// Access individual elements in the array
echo $array[0]; // Output: 10
echo $array[2]; // Output: 30