當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。