dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: how to php variable value assign as java script

  1. #1
    Join Date
    May 2013
    Posts
    119

    how to php variable value assign as java script

    Hello Gusy,
    <script> var id=`$`php; </script> i have add php variable store as JavaScript. but some thing wrong in my code. what wrong with there please help me .

  2. #2
    Join Date
    May 2013
    Location
    London, UK
    Posts
    16
    Just so I understand this, you're looking to create a JavaScript variable using PHP? You would do this like so:

    <script type="text/javascript">
    var id = '<?php echo $variable; ?>';
    </script>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles