本文整理汇总了PHP中DBUtils::arrayselect方法的典型用法代码示例。如果您正苦于以下问题:PHP DBUtils::arrayselect方法的具体用法?PHP DBUtils::arrayselect怎么用?PHP DBUtils::arrayselect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBUtils
的用法示例。
在下文中一共展示了DBUtils::arrayselect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<td><?php
echo $LangUI->_('Liquid/Solid');
?>
</td>
<td>
<?php
echo DBUtils::arrayselect($liqsol, 'ingredient_solid', 'size=1', $ingredient_solid);
?>
</td>
</tr>
<tr>
<td><?php
echo $LangUI->_('Location in Store');
?>
</td>
<td>
<?php
echo DBUtils::arrayselect($locations, 'ingredient_loc', 'size=1', $ingredient_loc);
?>
</td>
</tr>
</table>
<br/>
<input type="button" value="<?php
echo $ingredient_id ? $LangUI->_('Update Ingredient') : $LangUI->_('Add Ingredient');
?>
" class="button" onclick="SaveIngredient()">
<br />
</form>
</div>
示例2:
$meal = $MPObj->mealplanItems[$dbDate][$i]['meal'];
$servings = $MPObj->mealplanItems[$dbDate][$i]['servings'];
$recipe_id = $MPObj->mealplanItems[$dbDate][$i]['id'];
$recipe_name = $MPObj->mealplanItems[$dbDate][$i]['name'];
} else {
// It is a new one, give it blank values
$meal = NULL;
$servings = $defaultServings;
$recipe_id = NULL;
$recipe_name = NULL;
}
echo "<tr>\n";
echo '<td align="center">';
echo '<input type="checkbox" name="delete_' . $i . '" value="yes"></td>';
echo '<td align="center">';
echo DBUtils::arrayselect($mealList, 'meal_id_' . $i, 'size=1', $meal, true);
echo "</td><td align=\"center\">\n";
echo '<input type="text" autocomplete="off" name="servings_' . $i . '" value=' . $servings . ' size=3>';
echo '</td><td align="center">';
echo '<input type="text" autocomplete="off" name="repeat_' . $i . '" value=1 size=3> ' . $LangUI->_('Day(s)');
echo '</td><td align="center">';
echo "<div class=\"ui-widget\"><input id=\"recipeAuto_{$i}\" name=\"recipeAuto_{$i}\"value=\"{$recipe_name}\"/></div>";
echo "<input type=\"hidden\" id=\"recipeId_{$i}\" name=\"recipeId_{$i}\" value=\"{$recipe_id}\">\n";
echo "</td></tr>\n";
}
?>
</table>
<p>
<input type="button" id="saveMealPlanButton" value="<?php
echo $LangUI->_('Save');
?>
示例3:
?>
">
</td>
<td align="left">
<input type="text" size="4" autocomplete="off" name="ingredient_quantity_<?php
echo $iterator;
?>
" value="<?php
echo $ingObj->quantity;
?>
">
</td>
<td align="left">
<?php
echo DBUtils::arrayselect($localUnits, 'ingredient_units_' . $iterator, 'size=1', $ingObj->unitMap);
?>
</td>
<td align="left">
<input type="text" size="20" name="ingredient_qualifier_<?php
echo $iterator;
?>
" value="<?php
echo $ingObj->qualifier;
?>
">
</td>
<td width="50%" align="center">
<a href="./index.php?m=ingredients&a=view&ingredient_id=<?php
echo $ingObj->getID() . '">' . $ingObj->name;
?>
示例4:
<tr>
<th><?php
echo $LangUI->_('Section Name');
?>
</th>
</tr>
<tbody class="content">
<?php
for ($i = 0; $i < count($locations); $i++) {
$selected = 0;
echo "<tr>";
echo "<td style='width: 200px;'>";
if ($i < count($store_layout)) {
$selected = $store_layout[$i];
}
echo DBUtils::arrayselect($locations, 'section_' . $i, 'size=1', $selected);
echo "</td>";
echo "</tr>";
}
?>
</tbody>
<tr>
<th>
<input type="button" id="saveLayoutButton" value="<?php
echo $LangUI->_("Save Layout");
?>
" class="button">
</th>
</tr>
</table>
</form>