Have an account? Sign in
Login  Register  Facebook
how to write two ampersand for javascript in wordpress?
I use wordpress 3.0.1 and install Exec-PHP plungin.
I edit the code in admin panel- pages - html cede. I want to add some javascript in a custom page. when the code use two ampersand. it occupy wrong. `& &` become `& # 0 3 8 ; & # 0 3 8 ;`(the original code has no space) How to solve this problem? thanks.
for(i=0;i<3;i++)
{
   var l=a.length;
   //alert(l);
   var iNum=parseInt(Math.random()*l);
   //alert(iNum);
  
   b[i]=a[iNum];
   if(iNum==0&amp;&amp;iNum+1!=l){a.shift();}else if(iNum+1==l){a.pop()}else{a.splice(iNum,1)}
   //alert(b[i]);
   document.write(b[i]);
}
Started: September 22, 2011 Latest Activity: September 22, 2011 wordpress
1 Answer
Try
if(iNum==0 and iNum+1!=l)...

Posted: MacOS
In: September 22, 2011

Thanks, I solved this quetions. :)
September 22, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer