如何在PHP的IF条件下使用字符串
问题描述:
我有数组
我已使用爆破功能将数组转换为字符串,例如
i以下需要$ str变量作为if语句的条件,如下所示
I have array I have converted the array into string using implode function like below i need the $str variable as condition in if statement like below
[0]=>"1==1"
[1]=>"1==1"
[2]=>"2==1"
$str = "1==1 && 1==1 && 2==1";
if(1==1 && 1==1 && 2==1)