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!
The above code works fine. If i want to add first_name, last_name, how should i write and also how to iterate.
Note to moderator: viewtopic.php?f=1&t=80008. This was my earlier post of similar question. In the earlier post, i was asking building array from forloops and this one is from database. So, please do not think i am posting the same question twice. Thanks
I am indexing because i need values in seperate array. Please see this posting, viewtopic.php?f=1&t=80008, in which arborint suggestion works fine. In the same way i need to include first_name and last_name as well in that array.
I think what you want to do is this. I simplified the code a little more, you don't need the temp variable $member_id. This is a pretty common trick to create an array of database rows where the array keys are the primary keys, I am assuming that this code is doing something different from the previous post that was nested arrays.