Thread: Forum help
View Single Post
Old 12-17-2007, 06:10 PM   #6 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
Yea, but I need

$array[1] = array('thread_id' ..... );
$array[2] = array('thread_id' ..... );
$array[3] = .. etc
But why? Do you intend to do some special operations on the
indexes? I thought you just need the values, not the indexes... Basically, the code you wrote is okay, but you don't need to keep an additional count of the array..it's useless...if you need, do something like:

Code:
$this->threads_details = array( 0 => null ); // this should go into the constructor, perhaps

while( ... ) { /* do your stuff */ }
And nothing will be the same, each array child of the $this->threads_details will represent a unique row from the database...
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote