Quote:
Originally Posted by ngwheels
$test = array(blue, yellow, red, orange);
How can I get this to show up in a select box on my page? The will be dynamic based upon a couple variables received by the page, thats why I don't just type them straight into the template...
|
I found this snippet on the Zend site (
http://www.zend.com/zend/tut/tutorial-cezar.php):
You can create an array in PHP an pass it to the template:
Code:
$tmp = array ( 'UID'=> '10', &'Name' => 'John Doe', 'Address'=>'Home address');
$smarty->assign('info', $tmp);
Then build the drop-down from the array. I haven't tried it, but it looks pretty straightforward.