本文整理匯總了PHP中api::rate方法的典型用法代碼示例。如果您正苦於以下問題:PHP api::rate方法的具體用法?PHP api::rate怎麽用?PHP api::rate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類api
的用法示例。
在下文中一共展示了api::rate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
if (isset($data['firstCurrency'])) {
$currentRate = $data;
} else {
if (isset($_GET['Data'])) {
$currentRate = $_GET['Data'];
}
}
if (isset($currentRate['firstCurrency'])) {
$value = api::rate($currentRate['firstCurrency'], $currentRate['secondCurrency']);
}
?>
<div class="widgetrate-item">
<div class="widgetrate-rate">
<b><?php
print $currentRate['firstCurrency'];
?>
</b> / <b><?php
print $currentRate['secondCurrency'];
?>
</b>
</div>
<div class="widgetrate-value">
<span class="widgetrate-value-numb"><?php
print $value;
?>
</span>
<div class="widgetrate-close"></div>
</div>
</div>
示例2: foreach
*
* */
if (isset($data['firstCurrency'])) {
$currentRate = $data;
} else {
if (isset($_GET['Data'])) {
$currentRate = $_GET['Data'];
}
}
$defaultValue = api::rate($currentRate['firstCurrency'], $currentRate['secondCurrency']);
$pages = widgetControl::getPages();
if (count($pages) > 0) {
foreach ($pages as $key => $value) {
$firstCur = $value['rate']['firstCurrency'];
$secondCur = $value['rate']['secondCurrency'];
$pages[$key]['value'] = api::rate($firstCur, $secondCur);
}
}
?>
<div id="pageloader" class="widgetrate clearfix">
<?php
if (isset($pages)) {
?>
<?php
foreach ($pages as $key => $value) {
?>
<div onclick="selectPage(this);" class="widgetrate-item <?php
print $value['rate']['firstCurrency'] . $value['rate']['secondCurrency'];
?>
" data-num="<?php