Invalid argument supplied

I am getting a invalid argument supplied for foreach at the foreach statement. Anyone have any idea what I did wrong?

$billable_query = “SELECT * FROM contacts AS c INNER JOIN skills as s on c.skill_id = s.skill_id AND s.type = ‘0’ AND c.billable = ‘0’ INNER JOIN lproviders as l on l.lp_id s.lp_id INNER JOIN providerdispositions as p on p.lp_id = s.lp_id”;
$billable_contacts = $db->query($billable_query);
$lp = 1;

foreach ($billable_query as $b) {
if($b[‘lp_id’] == $lp) {
if ($b[‘timeclass’] = 0) {
if($b[‘agent_time’] > $b[‘threshold’]) {
$lp++;
}
}
} elseif ($b[‘lp_id’] == $lp) {
if ($b[‘timeclass’] = 1) {
if($b[‘total_time’] > $b[‘threshold’]) {
$lp++;
}
}
}
echo ‘

’;
print_r($b);
echo ‘
’;
}
Sponsor our Newsletter | Privacy Policy | Terms of Service