converting array of values to an  array of references
<p>When I use <code>print_r</code> to examine the contents of this function <code>$arr</code> and <code>$refs</code> are the same. </p>

<p>Odd because this was a solution given <a href="http://stackoverflow.com/questions/2045875/pass-by-reference-problem-with-php-5-3-1">here</a> to the problems of passing <code>call_user_func_array</code> an array of references.</p>

<p>Does this function return an array of references or an array of values?</p>

<pre><code>function makeValuesReferenced($arr){ 
    $refs = array(); 
    foreach($arr as $key =&gt; $value) 
        $refs[$key] = &amp;$arr[$key]; 
    return $refs; 

}
</code></pre>

<p>Function Call:</p>

<pre><code>print_r($db_-&gt;ref_arr(array(1,2,3,4)));
</code></pre>

<p>Results</p>

<pre><code>Array ( [0] =&gt; 1 
        [1] =&gt; 2 
        [2] =&gt; 3 
        [3] =&gt; 4 )
</code></pre>

<p>Info. on prepared statements <a href="http://stackoverflow.com/questions/7380657/prepared-statements-are-they-necessary">here</a></p>

<p>Info. on  call_user_func_array <a href="http://stackoverflow.com/questions/7381061/prepared-statements-creating-a-single-method">here</a> </p>

<p>Info. on the neccessity of references for call_user_func_array <a href="http://stackoverflow.com/questions/2045875/pass-by-reference-problem-with-php-5-3-1">here</a></p>

<p><strong>Does this function return an array of references or an array of values?</strong></p>

<p>Update:  using var_dump and adding &amp; to parameter gives similar results...adds verification that ints are being returned.</p>

<blockquote>
  <p>1 2 3 4 array(4) { [0]=> &amp;int(1) <a href="http://stackoverflow.com/questions/2045875/pass-by-reference-problem-with-php-5-3-1">1</a>=> &amp;int(2) <a href="http://stackoverflow.com/questions/7380657/prepared-statements-are-they-necessary">2</a>=> &amp;int(3) <a href="http://stackoverflow.com/questions/7381061/prepared-statements-creating-a-single-method">3</a>=>
  &amp;int(4) }</p>
</blockquote>
