I have declared a javascript variable ,
var myJavascriptVar = 12345;
And unable to assign that value to php variable;>
PHP is server side language and JS is client side.best way to do this is create a cookie using javascript and then read that cookie in PHP
PHP
JS
javascript