Assignto a global variable using an alias in foreach loop (php)
<p>I am trying to reassign a global variable (in this case '$aDoor') by doing ($checkbox = $data;) on line 8. Not sure how to solve this and would love some help!</p>

<pre><code>$checkboxes = array($aDoor,$bro);

foreach ($checkboxes as $checkbox =&gt; $checkdata) {
    $data = '';
    foreach ($checkdata as $check) {
        $data .= $check . ", ";
    }
    $checkbox = $data;
    echo $data;
}
echo $aDoor;
</code></pre>
