
此处被当成整体,解决办法:用函数in_array()? 'A' : 'B' ;转换。
<?=in_array($list['role'],array('A','0A'))?'代理':'经纪人';?>
//<?=的写法是简写,等同于echo 不推荐简写。
此处被当成整体,解决办法:用函数in_array()? 'A' : 'B' ;转换。
<?=in_array($list['role'],array('A','0A'))?'代理':'经纪人';?>
//<?=的写法是简写,等同于echo 不推荐简写。
本文标题:html中value中写三元运算被当成字符串输出
本文链接:https://www.haomeiwen.com/subject/voblaxtx.html
网友评论