SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Montana, USA
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to access a php variable in javascript?

    I have a php variable that I need to manipulate in javascript. How to I get "a handle" on the variable in my javascript code?

    Thanks in advance,
    Mike

  2. #2
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could use...
    Code:
    <script>
    myVar="<?php code to write variable?>"
    </script>
    But I don't know the php code to write a variable, but just replace that part...

  3. #3
    SitePoint Member
    Join Date
    Jul 2004
    Location
    greece
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

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