I found my answer with my self.
It’s look like this.
$abc="";
foreach($setLogic2 as $key => $value){
$abc.= $value['Conj'].' '.(int)$value['Topic'].' ';
}
//$abc = "0 And 1 And 1";
if(eval("return $abc;") == true) {
echo 'true boolean';
}
else if(eval("return $abc;") == false){
echo 'false boolean';
}
else{
echo 'none';
}
1
solved How to generate dynamic IF statement