note 117886 added to class.mysqli-result

From: Date: Wed, 26 Aug 2015 15:28:25 +0000
Subject: note 117886 added to class.mysqli-result
Groups: php.notes 
Request: Send a blank email to php-notes+get-203478@lists.php.net to get a copy of this message
If you're using the iterator interface on a result instance ($r), like this: foreach ($r as $d) { the iterated value ($d) is an associative-only array, i.e. it's the same as doing this: while ($d = $r->fetch_assoc()) { and NOT like this: while ($d = $r->fetch_row()) { so you can't access row elements by numeric index ($d[0] etc) if you use the foreach syntax. ---- Server IP: 72.52.91.14 Probable Submitter: 2a02:8424:2a38:e00:d0ab:5028:3daf:a25a ---- Manual Page -- http://php.net/manual/en/class.mysqli-result.php Edit -- https://master.php.net/note/edit/117886 Del: integrated -- https://master.php.net/note/delete/117886/integrated Del: useless -- https://master.php.net/note/delete/117886/useless Del: bad code -- https://master.php.net/note/delete/117886/bad+code Del: spam -- https://master.php.net/note/delete/117886/spam Del: non-english -- https://master.php.net/note/delete/117886/non-english Del: in docs -- https://master.php.net/note/delete/117886/in+docs Del: other reasons-- https://master.php.net/note/delete/117886 Reject -- https://master.php.net/note/reject/117886 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203478) next »