Skip to content

How to use javascript variable in PHP?

<script type="text/javascript">
var abc= 'this is text';
<?php $abc = "<script>document.write(abc)</script>"?>   
<?php echo $abc;?>
See also  TypeScript code snippet - How to list resource group in azure cli?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.