OK, so we're back to my original thought, which I didn't post, because another thought hit me at the time.
I was assuming that $active was some value whereby you determined whether or not you wanted to show the data. Is it, instead, that you want to show only a certain amount of data, i.e., staff members that are 'active'?
If that's the case, how do we know which of the staff are 'active'? Is this info in the db?
And, it would be better, (though it seems irrelevant if I'm right about the question now), to use
if ($status !="active")