A static variable is exactly the same as a global variable in every way, EXCEPT it is only accessible to code within the scope in which the variable was declared. If you declare a static variable within loop(), it is exactly like a global variable that can only be seen or used by code within loop().
Regards,
Ray L.