How can arrays be utilized in PHP to improve the design of code?

Using arrays in PHP can improve the design of code by organizing related data into a single variable, making it easier to manage and iterate through. Arrays can be used to store lists of items, key-value pairs, or multidimensional data structures. By utilizing arrays, you can streamline your code and make it more efficient and readable.

// Example of using arrays to store and iterate through a list of items
$fruits = ['apple', 'banana', 'orange'];

foreach ($fruits as $fruit) {
    echo $fruit . "\n";
}