1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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