note 72015 rejected from function.mysqli-stmt-bind-result by nlopess

From: Date: Fri, 29 Dec 2006 14:31:54 +0000
Subject: note 72015 rejected from function.mysqli-stmt-bind-result by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121007@lists.php.net to get a copy of this message
Note Submitter: Typer85 at gmail dot com ---- In response to 'matti at withoutthis dot keller dot com', Your function works great but there is one thing you should clear up when you say the following: '# But beware! when using the fetch in a loop, always COPY $result or else you might # end with all the same values because of the references'. Can someone explain how exactly to COPY the contents of an array that is referenced? Myself, I am having a little trouble. In my WHILE LOOP that fetches a result set I have the following: <?php $temp = $result; ?> This is my understanding of copying an array, unfortunately PHP seems to be referencing $temp to $result not copying it. So no matter what I do, the end result of my WHILE LOOP is always displaying the last fetched row because of the references. Anyone has a solution?

« previous php.notes (#121007) next »