html_options bug?

From: Date: Wed, 17 Apr 2002 03:13:08 +0000
Subject: html_options bug?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3783@lists.php.net to get a copy of this message
I wouldn't know a "bug" in a program if it bit me. but I can think of nothing else since my code seems to have no problems. I'm just trying to simply make a selection box in a form using {html_options}... here is my php script: ********************************************** <?php require('Smarty.class.php'); $smarty = new Smarty; $selection_options = array('eggs', 'bacon', 'ham', 'grits'); $selection_descriptions = array('scrambled', 'crispy', 'fried', 'runny'); $selected = 'happy'; $smarty->assign('selection_options' , $selection_options); $smarty->assign('selection_descriptions' , $selection_descriptions); $smarty->assign('selected' , $selected); $smarty->display("indexcopy.tpl"); ?> ********************************************** Here is a copy of my template (indexcopy.tpl) *********************************************** <html> <head> <title>Untitled</title> </head> <body> How are you today? <form action="script.php"> <select name="food"> {html_options values=$selection_options output=$selection_descriptions selected=$selected} </select> </form> </body> </html> *********************************************** here is the problem: When the code compiles for webbrowser output, it stops halfway. Notice how the html stops at the first <select> tag and nothing is after it. Any ideas why this is happening? ************************************************* <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> How are you today? <form action="myscript.php"> <select name="mood"> *************************************************

« previous php.smarty.general (#3783) next »