SMARTY template array search

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrewteg
    New Member
    • Aug 2007
    • 22

    SMARTY template array search

    I have a few arrays in SMARTY with different values in them and need to know the best way to figure out which array a value is in as it loops over it. Basically array_search for smarty but I don't know if that's a function or how to best reproduce that in SMARTY.

    Thanks,
    Andrew
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    If it doesn't exist? create your own:

    here's a tutorial how:



    Your custom will just be in PHP and uses array_search and passes back the output. It will be just basically a wrapper to the PHP array_search.

    Cheers,



    Dan

    Comment

    • andrewteg
      New Member
      • Aug 2007
      • 22

      #3
      Thanks! That's a great resource and I appreciate your pointing me there!

      Comment

      Working...