If you’re just starting PHP, it may not be immediately obvious how to print the contents of an array, but rest assured there are several very simple methods for displaying the contents of an array.
We’ll go through simple methods such asĀ print_r($array)
and var_dump($array)
but also show some other more unique methods.