how do i assaign php array var to javascript array var

how do i assaign php array var to javascript array v

Page 1 of 1

3 Replies - 2068 Views - Last Post: 28 April 2007 - 03:24 AM

#1 haris  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-April 07

how do i assaign php array var to javascript array var

Posted 27 April 2007 - 11:46 PM

how do i assaign php array var to javascript array v
Is This A Good Question/Topic? 0
  • +

Replies To: how do i assaign php array var to javascript array var

#2 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: how do i assaign php array var to javascript array var

Posted 28 April 2007 - 12:14 AM

You can't.
Was This Post Helpful? 0
  • +
  • -

#3 Styx  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 192
  • Joined: 04-March 07

Re: how do i assaign php array var to javascript array var

Posted 28 April 2007 - 02:54 AM

Actually, you can.

Just loop through the php array and echo the syntax you would use to add the value to a javascript array.

This post has been edited by Styx: 28 April 2007 - 02:56 AM

Was This Post Helpful? 0
  • +
  • -

#4 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: how do i assaign php array var to javascript array var

Posted 28 April 2007 - 03:24 AM

That's true, you can simply output an array's contents for javascript to use.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1