title: How to call a php function inside a smarty .tpl file?
body: <p>Hi i have written a function in .php file. i.e.</p>
  
  <pre><code>public static function getCategories($id_lang = false, $active = true, $order = true, $sql_filter = '', $sql_sort = '',$sql_limit = '')
  {
      if (!Validate::isBool($active))
          die(Tools::displayError());
  
      $result = Db::getInstance(_PS_USE_SQL_SLAVE_)-&gt;ExecuteS('
          SELECT *
          FROM `'._DB_PREFIX_.'category` c
          LEFT JOIN `'._DB_PREFIX_.'category_lang` cl 
          ON c.`id_category` = cl.`id_category`
          WHERE 1 '.$sql_filter.' '.($id_lang ? 'AND `id_lang` = '.(int)($id_lang) : '').'
          '.($active ? 'AND `active` = 1' : '').'
          '.(!$id_lang ? 'GROUP BY c.id_category' : '').'
          '.($sql_sort != '' ? $sql_sort : 'ORDER BY c.`level_depth` ASC, c.`position` ASC').'
          '.($sql_limit != '' ? $sql_limit : '')
      );
  
      if (!$order)
          return $result;
  
      $categories = array();
      foreach ($result AS $row)
      {
          $categories[$row['id_parent']][$row['id_category']]['infos'] = $row;
      }
      return $categories;
  }
  </code></pre>
  
  <p>and i want to call this function inside a .tpl file. I used <code>{php}  {/php}</code> way,but this not works.
  What is the way to call this one?</p>
  
  <p>Thanks</p>