如果isset语句不正确

I want to check if the reaction count is 0 then go in the if statement. The part without && ($app->count_reactie($topic['id']) == 0) does work but when I add this it won't work.

In the line above this code I use: implode($app->count_reactie($topic['id']))and it works so it is not that this code doesnt work. This code will return the number of reactions.

But this code down below is what I am trying to get to work.

if(isset($actiefboardid)){
  $toppic = $app->get_topics($actiefboardid);
    foreach($toppic as $topic){
    if(isset($_SESSION['klant_id']) && ($_SESSION['klant_id'] == $topic['klant_id']) && ($app->count_reactie($topic['id']) == 0)){ 

}}}

Hopefully someone can help me.

Try this:

$count = $app->count_reactie($topic['id']);

if(isset($_SESSION['klant_id']) && ($_SESSION['klant_id'] == $topic['klant_id']) 
&& ($count['COUNT(reactie)'] == 0)){