How to check for javascript array?

Discussion in 'JavaScript' started by computerzworld, Jan 20, 2008.

  1. #1
    Hello friends. I have one variable which acts as simple variable and array dynamically in PHP. I want to check that variable in javascript whether it is array or not. How can I check it? Please help me. Thanks in advance.
     
    computerzworld, Jan 20, 2008 IP
  2. akram

    akram Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you show us your code?
     
    akram, Jan 21, 2008 IP
  3. procmail

    procmail Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I've not tested it, just did a search on Google
    http://www.guyfromchennai.com/?p=27
     
    procmail, Jan 21, 2008 IP
  4. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The instanceof operator works fine. But we do need to see your code.
     
    MMJ, Jan 21, 2008 IP