each page request is completely separate, and although this may not be technically true depending on how the web server interacts with PHP, you can think of each request as running a new PHP process.
If you want instances of classes or other variables to persist across requests, you have to explictly use some library that supports that
One option, if you are using PHP's built in sessions, is to store your instance in the $_SESSIONS array. See
this
Another option is to use
APC, specifically the apc_store() and apc_fetch(), if your PHP includes this module (I think it's fairly standard anymore?)
There's also things like memcache but the previous options are probably easier.
Also, within a single PHP script, all <? ?> blocks have the same scope, so if you define a variable in one block, then close it, you can still refer to that variable in another block later on in the same PHP file.
I suppose I should say given your particular usage (a db helper class), you actually want to be creating a new instance with each page request I would imagine. The various DB APIs (including mysqli) have functionality to re-use connections to the database (which is the only thing you might actually want to persist), but it depends on how you the web server talks to the PHP process.
read this maybe