Need to fetch array of data from a function.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
balajikannan19
Forum Newbie
Posts: 2
Joined: Fri Jul 10, 2009 1:40 am

Need to fetch array of data from a function.

Post by balajikannan19 »

please help me in solving the problem.
i have a class with many functions.I am calling a function with the object from another PHP file.
The class function is the select query from a table in Mysql.When i call the function it is returning the first data in the table.
I need the whole table to be displayed when i call the function.
Advance thank you.
User avatar
pcoder
Forum Contributor
Posts: 230
Joined: Fri Nov 03, 2006 5:19 am

Re: Need to fetch array of data from a function.

Post by pcoder »

I think, It would be better to return the resource instead of array.
And you can fetch the array result from the calling page with this resource.
balajikannan19
Forum Newbie
Posts: 2
Joined: Fri Jul 10, 2009 1:40 am

Re: Need to fetch array of data from a function.

Post by balajikannan19 »

Can you say this in detail.I am not getting you.Sorry
Post Reply