By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,775 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,775 IT Pros & Developers. It's quick & easy.

Convert database attributes into record using PHP

P: 12

I need to convert database attributes into Records using PHP. For example

My database attributes are like :
[Name varchar(25), Roll integer, Number integer, Percentage real]

C like structure:
Expand|Select|Wrap|Line Numbers
  1. struct Info
  2. {
  3.   char Name[25];
  4.   int Roll;
  5.   int Number;
  6.   float Percentage;
  7. }  
  9.  Struct info Information[100];
I need to put each row data from database to the structure array.

1. Is it possible to code it in PHP ?
2. If possible please can u help me... how?

Advance Thanks
Dec 24 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 5,821
Heya, mostafijur.

Check out PHP Classes.
Dec 24 '07 #2

P: 59
you can use object collections, a feature of PHP 5, to achieve this. This is something i am currently working on myself.
Dec 25 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.