From 74889fd2f8fd0249908325f0245ea65fb7102e83 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Sat, 14 Nov 2009 00:46:30 +0000 Subject: [PATCH] Merge one more common user comment merged git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290729 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/oci8/functions/oci-bind-by-name.xml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/reference/oci8/functions/oci-bind-by-name.xml b/reference/oci8/functions/oci-bind-by-name.xml index 89ffe60ecc..3ec4c130db 100644 --- a/reference/oci8/functions/oci-bind-by-name.xml +++ b/reference/oci8/functions/oci-bind-by-name.xml @@ -785,6 +785,35 @@ print ''; succeed. + + + The PHP variable argument is a reference. Some + forms of loops do not work as expected: + + + + $value) { + oci_bind_by_name($stid, $key, $value); +} +]]> + + + + This binds each key to the location of $value, so all bound + variables end up pointing to the last loop iteration's + value. Instead use the following: + + + + $value) { + oci_bind_by_name($stid, $key, $myarray[$key]); +} +]]> + + + In PHP versions before 5.0.0 you must