note 75190 added to function.PDOStatement-fetchAll

From: Date: Thu, 17 May 2007 13:09:53 +0000
Subject: note 75190 added to function.PDOStatement-fetchAll
Groups: php.notes 
Request: Send a blank email to php-notes+get-126659@lists.php.net to get a copy of this message
Is there a way to get a result like: array(3) { ["apple"]=> string(5) "green", ["pear"]=> string(5) "green", ["watermelon"]=> string(5) "green" } I've a table with 2 columns named 'name' and 'value' and i'd like to avoid using another loop to generate my array. ---- Server IP: 217.13.201.10 Probable Submitter: 87.123.118.220 ---- Manual Page -- http://www.php.net/manual/en/function.PDOStatement-fetchAll.php Edit -- https://master.php.net/note/edit/75190 Del: integrated -- https://master.php.net/note/delete/75190/integrated Del: useless -- https://master.php.net/note/delete/75190/useless Del: bad code -- https://master.php.net/note/delete/75190/bad+code Del: spam -- https://master.php.net/note/delete/75190/spam Del: non-english -- https://master.php.net/note/delete/75190/non-english Del: in docs -- https://master.php.net/note/delete/75190/in+docs Del: other reasons-- https://master.php.net/note/delete/75190 Reject -- https://master.php.net/note/reject/75190 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126659) next »