asp转php中if标签中全部都要2个等号么例1:{if:{maccms:curvodtypeid}=[menulist:id]} class="active" {end if}是不是要改成{if:{maccms:curvodtypeid}==[menulist:id]} class=="active" {end if}例2:{if: [vodlist:state]>0}[vodlist:name len
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 12:53:08
asp转php中if标签中全部都要2个等号么例1:{if:{maccms:curvodtypeid}=[menulist:id]} class="active" {end if}是不是要改成{if:{maccms:curvodtypeid}==[menulist:id]} class=="active" {end if}例2:{if: [vodlist:state]>0}[vodlist:name len
asp转php中if标签中全部都要2个等号么
例1:
{if:{maccms:curvodtypeid}=[menulist:id]} class="active" {end if}
是不是要改成
{if:{maccms:curvodtypeid}==[menulist:id]} class=="active" {end if}
例2:
{if: [vodlist:state]>0}[vodlist:name len=8]至第[vodlist:state]集{else}[vodlist:name]{end if}
是不是要改成
{if: [vodlist:state]!=0}[vodlist:name len==8]至第[vodlist:state]集{else}[vodlist:name]{end if}
asp转php中if标签中全部都要2个等号么例1:{if:{maccms:curvodtypeid}=[menulist:id]} class="active" {end if}是不是要改成{if:{maccms:curvodtypeid}==[menulist:id]} class=="active" {end if}例2:{if: [vodlist:state]>0}[vodlist:name len
asp中赋值和判断是否相等都是用单等号“=”,php中赋值用单等“=”,判断用双等“==”;
html的标签都是通用的,象才是对的.
if标签是判断,php里面是一定要用双等的“==”
所以你的例1和例2都是错的的;
例1:{if:{maccms:curvodtypeid}==[menulist:id]} class="active" {end if} class="active"是html语言,不用双等
例2{if: [vodlist:state]>0}[vodlist:name len=8]至第[vodlist:state]集{else}[vodlist:name]{end if} 里面应该都不用改,因为都是赋值的