View Single Post
  #2  
Old 06-01-2014, 12:14 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 599,686
Hall of Famer is on a distinguished road
Default

Well standard smarty array assignment works like this:

PHP Code:
$myArray = array('no' => 10'label' => 'Peanuts'); $smarty->assign('foo',$myArray); 
In this script I made a class called Template inheriting the parent Smarty class, and the assign method still works. The template object is stored inside the mysidia object from registry, you can access it like this:

PHP Code:
$mysidia Registry::get("mysidia");
$mysidia->template->assign('arrayname'$array); 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote