I have the following problem in my php function:
$items is an array. It is never empty, But sometimes it has only has NULL values which returns an array value of [0]. How do I convert the conditional to say: If $items is not empty and if the $items array does not return a value of [0], then do this. . . ?
Thanks.
$items = Items_Model_Item::findBy(array('where' => new JO_Db_Expr('item.id IN (SELECT id FROM dbtable WHERE challengeId LIKE ' . Helper_Db::quote($challengeIDPLUS['code']) . ')')));
if (!empty($items)) {
foo
} else {
bar
}