If we really want to print an array as it is, we will use the print_r()
function. This shows us all the keys and their values of the directory we’re writing:
<?php
$colors = ['blue', 'orange', 'green'];
print_r($colors);
?>
An output appears on the screen:
Array
(
[0] => blue
[1] => orange
[2] => green
)