Echo all columns and rows when not knowing column names

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
JKM
Forum Contributor
Posts: 221
Joined: Tue Jun 17, 2008 8:12 pm

Echo all columns and rows when not knowing column names

Post by JKM »

Hi there,

is there a way to echo all columns and rows with PHP when I don't know any column names?
phpdevelopindia
Forum Newbie
Posts: 1
Joined: Tue Apr 28, 2009 12:51 am
Location: India

Re: Echo all columns and rows when not knowing column names

Post by phpdevelopindia »

Hi,

As per my knowledge, you need to fetch all rows in Associated Array and set it in For..Each loop in place of simple For loop.

In For..Each loop, you will get key value of of each row and use array key value as a label.
Post Reply