本文整理汇总了PHP中FormHelper::array2options方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHelper::array2options方法的具体用法?PHP FormHelper::array2options怎么用?PHP FormHelper::array2options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHelper
的用法示例。
在下文中一共展示了FormHelper::array2options方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<p>
<label>State:</label>
<span>
<select name="fldState">
<option value="" class="selectgrey">Any State</option>
<?php
echo FormHelper::array2options($stateList, $fldState);
?>
</select>
</span>
</p>
<!-- ZIP code and Distance -->
<p class="alt">
<label>ZIP Code:</label>
<span>
<input type="text" name="fldZipCode" style="width:80px;margin-right:3px;"
value="<?php
echo $fldZipCode;
?>
" />
within
<select name="fldDistance" style="width: 95px;margin-right:5px;">
<option value="any">Any Miles</option>
<?php
echo FormHelper::array2options($distanceList, $fldDistance);
?>
</select>
</span>
</p>
示例2:
<!-- Positions -->
<?php
if (count($sportList) == 1) {
?>
<p class="alt">
<?php
} else {
?>
<p>
<?php
}
?>
<label>Sport Position:</label>
<span>
<select name="fldPrimaryPosition">
<option value="" class="selectgrey">Any Primary Position</option>
<?php
echo FormHelper::array2options($positionList, $fldPrimaryPosition);
?>
</select>
</span>
<span style="padding-top:3px;">
<select name="fldSecondaryPosition">
<option value="" class="selectgrey">Any Secondary Position</option>
<?php
echo FormHelper::array2options($positionList, $fldSecondaryPosition);
?>
</select>
</span>
</p>
示例3:
?>
</select>
</span>
</p>
<!-- Class Rank -->
<p>
<label>Class Rank:</label>
<span>
<select name="fldClassRank">
<option value="" class="selectgrey">Any Class Rank</option>
<?php
echo FormHelper::array2options($classRankList, $fldClassRank);
?>
</select>
</span>
</p>
<!-- Intended Major -->
<p class="alt">
<label>Intended Major:</label>
<span>
<select name="fldIntendedMajor">
<option value="" class="selectgrey">Any Intended Major</option>
<?php
echo FormHelper::array2options($majorList, $fldIntendedMajor);
?>
</select>
</span>
</p>
示例4:
</div>
<div class="col-right">
<p>
<label>Ratings:</label>
<span style="padding-top:3px;">
<select name="fldIntangible_rating_min">
<option value="" class="selectgrey">Any Rating</option>
<?php
echo FormHelper::array2options($ratingList, $fldIntangible_rating_min);
?>
</select>
</span>
<?php
/*?><label> </label>
<span style="padding-top:3px;">
<select name="fldIntangible_rating_max">
<option value="" class="selectgrey">Any Max Rating</option>