robert_gsfame Posted July 20, 2010 Share Posted July 20, 2010 I try both of this n gave me different result :confused: if(paging!=="0"){ var pagex="¤tpage="+paging;}else{ var pagex="";} this will result ¤tpage=0 when paging is equal to 0 if(paging=="0"){ var pagex="";}else{ var pagex="¤tpage="+paging;} no result for this when paging is equal to 0 how come this gave different result?? Link to comment https://forums.phpfreaks.com/topic/208313-if-problem/ Share on other sites More sharing options...
buddhika2010 Posted July 22, 2010 Share Posted July 22, 2010 if(paging!=0){ var pagex="¤tpage="+paging;}else{ var pagex="";} this will result ¤tpage=0 when paging is equal to 0 if(paging==0){ var pagex="";}else{ var pagex="¤tpage="+paging;} Link to comment https://forums.phpfreaks.com/topic/208313-if-problem/#findComment-1089502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.