本文整理匯總了PHP中Listing::showSqft方法的典型用法代碼示例。如果您正苦於以下問題:PHP Listing::showSqft方法的具體用法?PHP Listing::showSqft怎麽用?PHP Listing::showSqft使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Listing
的用法示例。
在下文中一共展示了Listing::showSqft方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getSqft
public function getSqft()
{
// copy from listing_detail.php
if ($this->property_type_2 == 42) {
//property type land
$sqft = MyFunctionCustom::convertData($this->land_area, 'sqm');
$sqftcontent = $sqft != 0 && $sqft != '' ? "{$sqft} sqft" : '';
} else {
$sqft = $this->floor_area;
$sqm = $this->floor_area;
if ($this->floor_area_unit == Listing::FLOOR_UNIT_SQM) {
$sqft = MyFunctionCustom::convertData($this->floor_area, 'sqm');
}
if ($this->floor_area_unit == Listing::FLOOR_UNIT_SQFT) {
$sqm = MyFunctionCustom::convertData($this->floor_area, 'sqft');
}
$tmp = array();
if ($sqft != 0 && $sqft != '') {
$tmp[] = "{$sqft} sqft";
}
if ($sqm != 0 && $sqm != '') {
$tmp[] = "{$sqm} sqm (built-up)";
}
$sqftcontent = implode(' / ', $tmp);
}
$s = Listing::showSqft($sqftcontent, Listing::GetFormatLandArea($this));
$arr = explode('/', $s);
return trim(str_replace('sqft', '', $arr[0]));
}
示例2: psf
?>
<span class="type ">
<?php
echo $text_price;
?>
</span>
<?php
}
?>
</p>
<p><?php
echo "{$sqf} psf (built-up)";
?>
</p>
<p><?php
echo Listing::showSqft($sqftcontent, Listing::GetFormatLandArea($model));
?>
</p>
<?php
$addressTitle = Listing::GetAddressReal($model);
?>
<p><?php
echo $addressTitle;
?>
, Singapore <?php
echo $model->postal_code;
?>
</p>
</div>
</div>