note 110315 added to function.mysql-fetch-array

From: Date: Wed, 10 Oct 2012 10:10:04 +0000
Subject: note 110315 added to function.mysql-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-191229@lists.php.net to get a copy of this message
easiest way to get ALL results from a query in an array: <?php while($results[@$i++]=mysql_fetch_array($result)){} /*inside $i you have the count of elements, starting at 1. *you get an array with $i elements where the element $i is a bool(false) */ ?> ---- Server IP: 69.147.83.199 Probable Submitter: 95.136.43.99 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php Edit -- https://master.php.net/note/edit/110315 Del: integrated -- https://master.php.net/note/delete/110315/integrated Del: useless -- https://master.php.net/note/delete/110315/useless Del: bad code -- https://master.php.net/note/delete/110315/bad+code Del: spam -- https://master.php.net/note/delete/110315/spam Del: non-english -- https://master.php.net/note/delete/110315/non-english Del: in docs -- https://master.php.net/note/delete/110315/in+docs Del: other reasons-- https://master.php.net/note/delete/110315 Reject -- https://master.php.net/note/reject/110315 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191229) next »