I\'m trying to put the following code into a function as I need to use it quite a few times but with one variable changed ($subject) but it doesn\'t seem to be working. If I rem
$connect
is no longer accessible inside the function. A simple, but bad fix would be this:
function count($subject){
global $connect
A better fix would be for you to send in the $connect
variable to the function:
function count($subject, $connect){
And change your function calls to
count("The subject", $connect)