Re: Creating Arrays

From: Date: Wed, 11 Apr 2001 21:01:38 +0000
Subject: Re: Creating Arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48199@lists.php.net to get a copy of this message
http://www.php.net/manual/en/function.msql-fetch-array.php Hope this helps. "Ashley M. Kirchner" wrote: > I need to convert an MySQL result into an Array...somehow. The > query returns the following: > > +----+-----------+ > | ID | Project | > +----+-----------+ > | 1 | Home | > | 2 | Work | > | 3 | Family | > | 4 | Misc. | > | . | ... | > | . | ... | > +----+-----------+ > > ...which I want to convert into: > > Array(1 => "Home", 2 => "Work", 3 => "Family", 4 => > Misc.", etc....); > > What's the best way to do this. > > AMK4 > > -- > W | > | I haven't lost my mind; it's backed up on tape somewhere. > |____________________________________________________________________ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Ashley M. Kirchner <mailto:ashley@pcraft.com> . > 303.442.6410 x130 > SysAdmin / Websmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . eFax 248.671.0909 > http://www.pcraft.com . 3550 > Arapahoe Ave #6 > .................. . . . . Boulder, CO 80303, USA > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#48199) next »