Creating Arrays

From: Date: Wed, 11 Apr 2001 16:10:40 +0000
Subject: Creating Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-48181@lists.php.net to get a copy of this message
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

« previous php.general (#48181) next »