带有选择菜单的PHP数组..

时间:2015-01-26 06:47:51

标签: php arrays

我有一个数组。我需要数组来做左边的文字。但它正在做选择框中的内容。这是代码。当我选择"这是一个"当我回应它时,我希望它是"一个"但它正在做什么"这是一个" ...

array( "name" => __('Choose Slider Transition','Slider'),
"desc" => __('Choose The Slider Transition for Slide 1.'),
"id" => $shortname."_1_transition",
"type" => "select",
"options" => array(
    'none' => 'none',
    'one' => 'This is One',
    'two' => 'This is Two',
    'three' => 'This is Three'),
    "std" => "fade"),

1 个答案:

答案 0 :(得分:0)

试试这个(也许我不是误会):

<select name="select" id="clselect">
<option value="None">None</option>
<option value="One">This is One</option>
<option value="Two">This is Two</option>
<option value="Three">This is Three</option>
</select>

<?php
$getdata=substr($_POST['clselect']),0,-4)
echo $getdata;
?>