print_r or var_dump are the functions used mostly do display the contents of an array for debugging purposes. Ideally its a dump of everything in the array php display array print_r($posts_rows); echo "var dump follows"; var_dump($posts_rows);