PHP actually does replace the value of counter in states.php. It just doesn't matter, because you re-initialize it in the for statement.
PHP does not carry values to other pages without submitting a form or reading a session/cookie,
AFAIK. Besides, it does not matter because you re-initialize it again in the for statement in capitals.php.
HTH,
Snib
<><