当前位置: 首页>>代码示例>>PHP>>正文


PHP DBUtils::arrayselect方法代码示例

本文整理汇总了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>
开发者ID:pjflameboy,项目名称:phprecipebook,代码行数:30,代码来源:addedit.php

示例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');
?>
开发者ID:pjflameboy,项目名称:phprecipebook,代码行数:31,代码来源:edit.php

示例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;
    ?>
开发者ID:pjflameboy,项目名称:phprecipebook,代码行数:31,代码来源:current_ingredients.php

示例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>
开发者ID:pjflameboy,项目名称:phprecipebook,代码行数:31,代码来源:edit_layout.php


注:本文中的DBUtils::arrayselect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。