is variable in php
Correct of top code ?
php runs on the server. JS runs in the browser. The server generates resources (html, js, css) for the browser, so php can write JS with which initializes variables to specific values. JS can send data back to the server over HTTP (fetch) or websockets. The server then has to handle those data. JS does not write code that runs on the server. If it does, you have a major security hole
Why not just move Jsv1 into PHP? <?php $jsv1 = 80; ?> Jsv1 = '<?=$jsv1?>'; <?php $var = $jsv1; ?> Jsvar.innerHTML = '<?=$var?>';
My apologies for bursting your bubbles, they / them do not seem to understand which executes first, php on the server or javascript on the browser, you are going to be mansplaining how the whole stack works
It's like 40% trolling anyway
Обсуждают сегодня