如果条件没有在PHP中正确检查?

I am working on submission system. I have a drop down list when user want to edit the section drop-down need to be matched select option to visible in drop down list based on before saved in database value. I write some code for this option but it's not working properly. This same code I have used for the antoher project it's working well. An error also not coming I have checked syntax no problem.

enter image description here

                 <?php  

                    $journalid = $_GET['jiid'];
                    $sqlold = "SELECT `jtype`, `jtitle` FROM `journal` WHERE jid=? LIMIT 1";
                    $db->query($sqlold);
                    $db->bind(1, $journalid);
                    $db->execute();
                    $resjid = $db->resultset();
                    foreach($resjid  as $resjtype){
                          $resjournaltype = $resjtype['jtype'];
                    }                         
                    echo 'Res Ournal Type: '.$resjournaltype;
                    $db->query("SELECT article_name, article_value FROM article_type");
                    $db->execute();
                    $resultrow = $db->resultset();  
                    foreach($resultrow as $vals){
                    if($resjournaltype == $vals['article_value'] ){
                     echo "yes";
                    }

                            ?>
                                    <option <?php //if ( $jtype == $res['article_value'] )  echo 'selected = "selected"'; ?> value="<?php echo $res["article_value"];?>"><?php echo $res['article_name']; ?> </option>
                            <?php
                            else {?>
                            <option <?php //if ( $jtype == $res['article_value'] )  echo 'selected = "selected"'; ?> value="<?php echo $res["article_value"];?>"><?php echo $res['article_name']; ?> </option>                                  
                            <?php
                                    } 

                                }*/
                                else{   

                            ?>
                            <option <?php //if ( $resjid[0]['jtype'] == $vals['article_value'] )  echo 'selected = "selected"'; ?> value="<?php echo $vals["article_value"];?>"><?php echo $vals['article_name']; ?> </option>
                          <?php
                                    }
                                }
                        ?>                  

I am searching for a solution every where on the Internet but I forgot some syntax problems. These problems not giving an error. If here I am checking if condition inside for-each loop here is I made a mistake. My actual code is this. The problem was I am checking two string, not numbers. In PHP string values compare with strcmp() function.

 if($resjournaltype == $vals['article_value'] )
 {  echo "yes"; }

I changed condition like this finally my problem has been solved.

if(strcmp($resjournaltype, $vals['article_value']) == true){
    echo $resjournaltype .'-'. $vals['article_value'] ; }