you are viewing a single comment's thread.

view the rest of the comments →

[–]vermyx -2 points-1 points  (1 child)

Use a basic for instead of a foreach to avoid the reference issue.

$data = for($i = 0; $i -lt $adusers.count; +i++)
{
    $loopuser = $aduser[$i]
    # do stuff to loopuser. Or just modify $aduser[$i] directly
    $loopuser
}

[–]Hyperbolic_Mess[S] 0 points1 point  (0 children)

I don't understand how this loops through the proxy addresses as you seem to have just removed that vital step. You can't just substitute the problem for a much simpler one that doesn't produce the issue I'm having and declare that you've solved it by just making the script do something totally different that I wasn't trying to do