本文整理匯總了PHP中format::dollar_format方法的典型用法代碼示例。如果您正苦於以下問題:PHP format::dollar_format方法的具體用法?PHP format::dollar_format怎麽用?PHP format::dollar_format使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類format
的用法示例。
在下文中一共展示了format::dollar_format方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: variant_dropdown
/**
* Provide a dropdown for variants
* @developer Brandon Hansen
* @date Nov 2, 2010
*/
public static function variant_dropdown(Product_Model $product)
{
$options = array();
foreach ($product->variants as $variant) {
$options[(string) $variant] = $variant->name . ' - ' . format::dollar_format($variant->price);
}
return self::dropdown(array('name' => 'variant_id', 'id' => 'select-variant'), $options);
}
示例2:
<h2><?php
echo $store->name;
?>
</h2>
<h6>Store Income: <?php
echo format::dollar_format($store->total_income());
?>
</h6>
<h6>Income Per Day Average: <?php
echo format::dollar_format($store->income_per_day_average());
?>
</h6>
示例3: array
<td>
<?php
echo form::open('cart/update_quantity');
?>
<?php
echo form::hidden('id', $cart_item);
?>
<?php
echo form::input(array('name' => 'quantity', 'value' => $cart_item->quantity, 'class' => 'cart-item-quantity-input', 'id' => 'quantity-' . $cart_item));
?>
<?php
echo form::close();
?>
</td>
<td><?php
echo format::dollar_format($cart_item->product_subtotal());
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="right padd-me">
<?php
echo form::open('cart/billing', array('method' => 'GET'));
?>
<?php
echo form::submit('submit', 'Checkout');