Page 1 of 1

Echo all columns and rows when not knowing column names

Posted: Mon Apr 27, 2009 5:11 pm
by JKM
Hi there,

is there a way to echo all columns and rows with PHP when I don't know any column names?

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

Posted: Tue Apr 28, 2009 1:05 am
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.