creating an array from a mysql result

From: Date: Mon, 30 Oct 2000 05:17:22 +0000
Subject: creating an array from a mysql result
Groups: php.general 
Request: Send a blank email to php-general+get-22608@lists.php.net to get a copy of this message
Hey all, I was wondering on how to do the following: while ( $row = mysql_fetch_row($details) ) { $field0=$row[0]; $field1=$row[1]; $field2[]=$row[2]; $field3=$row[3]; $field4=$row[4]; $field5=$row[5]; $filed6=$row[6]; } *Note I am trying to put field2 into an array if ( in_array ($value, $field2) ) { Do something } for some reason I can't get this to work I thought that for each loop of the while a value would be added can the above actually be done or will I have to try something else. I don't want to use mysql_fetch_array() as this is a overly complex way to get one field into an array and I have the worst flu at the moment my head feels like it is going to explode. Any help would be a godsend, Regards Joseph

« previous php.general (#22608) next »