note 104451 deleted from mysqli-stmt.bind-result by danbrown
| From: | danbrown@php.net | Date: | Thu, 16 Jun 2011 14:42:47 +0000 |
| Subject: | note 104451 deleted from mysqli-stmt.bind-result by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180612@lists.php.net to get a copy of this message | ||
Note Submitter: scragar at gmail dot com
----
To clarify for anyone having problems with arrays, PHP will automatically pass arrays as references,
cloning the array if needed in the event of setting or unsetting a part of it, changing a referenced
variable does not trigger cloning.
This is done for efficiency, to clone an array containing this information you may either use a
foreach loop, or set/unset a key. Techniques like array_values will also work provided you
don't mind losing your keys.