How do I allow a function to access a database connection without using GLOBAL?
config.php
DEFINE (\'DB_HOSTNAME\', \'hostname\'); DEFINE (\'DB_DAT
There are more ways. You could use classic procedural style:
function something($dbc)
or anonymous function (if you use PHP5.3):
$fn = function() using ($dbc)