Issue
I wrote a simple foreach to filter one array and write it's results to another array.
foreach ( $users as $user ) {
...
$user_email_list[ ] = $user[ "intranet-id" ][ "value" ];
...
}
Problem is that NetBeans is showing me a warning "Variable does not seem to be used in its scope" on $user
. If I try to initialize $user
before foreach, no warning shows. However it doesn't seem to be right.
Is this a NetBeans bug or do I simply misunderstand anything?
I am using NetBeans version 6.7.1 (Build 200907230233) and PHP 5.2.10.
Solution
Netbeans might be getting it wrong - the code seems ok.
Answered By - Emil Ivanov
Answer Checked By - Marilyn (JavaFixing Volunteer)