PHPverse 2025

Voting

: max(one, seven)?
(Example: nine)

The Note You're Voting On

dub357 at gmail dot com
1 year ago
The note about the PHP var argument being a reference and some kinds of loops not working is very important here. However, you can make a foreach loop work if you create a temporary variable, use that in the bind and then unset it. For example:

<?php
foreach ($myarray as $key => $val) {
$value = $val;
oci_bind_by_name($stid, $key, $value);
unset(
$value);
}
?>

This binds each key to the location of $value, but when you unset it after binding, it can be set and used again.

https://www.php.net/manual/en/function.unset.php

<< Back to user notes page

To Top