Smarty array to JavaScript?

Discussion in 'Programming' started by dargre, Jun 22, 2007.

  1. #1
    Is there any other easier way to convert smarty array to javascript?
    I use:
    This outputs all array items to page source... :confused:
     
    dargre, Jun 22, 2007 IP
  2. ProgrammersTalk

    ProgrammersTalk Peon

    Messages:
    684
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not sure with what do you mean with smarty_array :-?
     
    ProgrammersTalk, Jun 23, 2007 IP
  3. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Which is normal: all javascript code is outputted to the browser. you can't assign the value of an array element by using php without displaying it in the source code.

    I think that's the easiest way to accomplish what you want
     
    UnrealEd, Jun 23, 2007 IP
  4. SeLfkiLL

    SeLfkiLL Active Member

    Messages:
    85
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    50
    #4
    SeLfkiLL, Jun 23, 2007 IP