got the answer from you clive :) Thanks On Jan 18, 2008 1:02 PM, clive <clive_lists@xxxxxxxxxxxxxxxxxxx> wrote: > if ($question == 'php') > domail('phplist',$question); > > if ($question == 'smarty') > domail('smartylist',$question); > > > > Hi All, > > > > I using html_options smarty tag to output an associative array in select > > drop down. > > Here a sample associative array: > > > > array(5) { > > ["CN-PEK-KEJ"]=> > > array(1) { > > [198]=> > > string(7) "TechTst" > > } > > ["IE-DUB-GAS"]=> > > array(2) { > > [177]=> > > string(10) "store room" > > [39]=> > > string(10) "TechStop 2" > > } > > ["UK-LON-BEL"]=> > > array(1) { > > [88]=> > > string(16) "TechStop-LON-BEL" > > } > > ["IE-DUB-GOR"]=> > > array(1) { > > [159]=> > > string(10) "TechStop 1" > > } > > ["US-NYC-9TH"]=> > > array(1) { > > [194]=> > > string(12) "TestTechStop" > > } > > } > > > > > > and the syntax I have used to output this was: > > {html_options name='locationId' options=$locations > > selected=$selectedLocation} > > where in I assign $selectedLocation with one of the options after > selecting > > them. > > > > Even after everything being right, the option thats been selected is not > set > > but it again goes back to show the first option after submit. > > > > Looks like either smarty misinterprets this selected option or is there > > something wrong from my end. > > > > Cheers > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Mark is on the way to make a Mark in your hearts ----- Fight back spam! Download the Blue Frog. http://www.bluesecurity.com/register/s?user=Z290aHNfMzE4OTg2NA%3D%3D