What are some ways to iterate through a non-numeric array in PHP and access the next and previous elements?

When iterating through a non-numeric array in PHP, you can use the `current`, `next`, `prev`, and `reset` functions to access the current, next, previous, and first elements of the array, respectively. These functions allow you to traverse the array without relying on numeric indexes.

$nonNumericArray = ['apple', 'banana', 'cherry', 'date'];

// Access the first element
echo current($nonNumericArray) . "\n";

// Access the next element
echo next($nonNumericArray) . "\n";

// Access the previous element
echo prev($nonNumericArray) . "\n";