How to assig a PHP variable a value inside a JavaScript block?

Jaimefoo

New Member
\[code\]if ($page_title->exists()) {//the rest of the code is in php.here i insert a javascript for the confirm box. echo'<script type= "text/javascript" >var b=confirm("This page already exists.would you want to edit");if(b == true)//here i want to assign a php variable , say for eg. $a to 1 so that i can use that value of $a in an if clause outside this javascript code.</script>';}if($a==1)..some code..\[/code\]How do I do it?
 
Back
Top