Can you provide some best practices for effectively using arrays in PHP scripts, especially when dealing with multiple values?

When dealing with multiple values in PHP scripts, it is best practice to use arrays to efficiently store and manipulate these values. To effectively use arrays, it is important to properly initialize, access, and iterate through them. Utilizing built-in array functions and methods can also simplify array manipulation tasks.

// Example of effectively using arrays in PHP scripts
// Initializing an array with multiple values
$fruits = array("apple", "banana", "orange");

// Accessing array values using indexes
echo $fruits[0]; // Output: apple

// Iterating through an array using foreach loop
foreach ($fruits as $fruit) {
    echo $fruit . " ";
}
// Output: apple banana orange