Are the scope of variables the same as in C++?
For example you could use $row in the main part of the php script and also use $row in a function and both have seperate memory addresses?
RTFM