PHP7 Array Iteration Trick

In this tutorial we're going to look into a look tip for dealing with PHP array iterations with PHP 7. When you're developing in PHP and need to iterate over an array you'll probably see something like this.

foreach($array['values'] as $value)
{
}

The problem with this is that you're assuming that the array will always have a key of values $array['values']. If this isn't set PHP will error saying that values is not defined. This is where you'll s