Re: [SMARTY] html_option wish
| From: | SKudwien | Date: | Mon, 17 Mar 2003 13:43:12 +0000 |
| Subject: | Re: [SMARTY] html_option wish | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8692@lists.php.net to get a copy of this message | ||
>Hi,
>
>I need to define if user select none of the option values <option
>label="" value="0">""</option> or <option
>label="None"
>value="0">"None"</option>
>
>I try array_unshift, array_splice, arry_merge but this reindex the
array
>The only way it's $myArray[0] = "" but go to the bottom of popup and
>need have this at the top. Another way it's to make a php function to
do
>that, but think there a no sens.
To do it right in PHP:
$options = array( 0 => "" ) + (array)$options;
then assign $options as usual...
Cheers,
.SMK.