To see the contents of array you can use:
-
print_r($array);
or if you want nicely formatted array then:echo '<pre>'; print_r($array); echo '</pre>';
-
Use
var_dump($array)
to get more information of the content in the array like the datatype and length. -
You can loop the array using php’s
foreach();
and get the desired output. More info on foreach is in PHP’s documentation website: foreach