Add a parameter to that function so that you can pass the $a_req array into the function. (Alternatively you could declare it as global within the function, but that is generally considered sub-optimal programming.)
PS: If it's not clear as to why, see http://php.net/manual/en/language.variables.scope. php


![[RESOLVED] Notice: Undefined variable: counter](/images/thp_r1581.gif)
