1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accessing PHP variables in templates

Discussion in 'Troubleshooting and Problems' started by Afforess, Jun 29, 2012.

  1. Afforess

    Afforess Member

    I've had a lot of success using the callback system for Xenforo pages to return php variables. My question is that if I know the index into an array, how to I get the value out of the array. Something like :

    <div id="Foo">
    <b>Bar: </b> {$myArray[{$index}]}
    Doesn't seem to work. Is there a way to access the element at a specific index in the array object from the xenforo templates?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Or if the index itself is a variable:

    CaptainMorgan likes this.

Share This Page