How can PHP beginners learn the fundamentals of working with arrays?

PHP beginners can learn the fundamentals of working with arrays by practicing basic array operations such as creating arrays, accessing array elements, adding and removing elements, and looping through arrays. They can also refer to PHP documentation and online tutorials to understand the various array functions available in PHP.

// Creating an array
$fruits = array("apple", "banana", "orange");

// Accessing array elements
echo $fruits[0]; // Output: apple

// Adding elements to an array
$fruits[] = "grape";

// Removing elements from an array
unset($fruits[1]);

// Looping through an array
foreach ($fruits as $fruit) {
    echo $fruit . " ";
}
// Output: apple orange grape