有人可以帮我在这里添加一个排序功能...我需要“if”结果按 floorplan_price 进行 ASC 排序。
if ($this->floorplan=ipropertyHTML::getcatfloorplan($this->catinfo->id))
{
echo '<h2 class="ip-floorplan-header" style="margin-top:-50px;color:#B20839; font-weight: bold;">Available Floorplans To Build</h2>';
$this->k = 0;
$this->floorplan=ipropertyHTML::getcatfloorplan($this->catinfo->id);
foreach($this->floorplan as $fp)
{
$this->floorplan_price=$fp->floorplan_price;
$this->floorplaninfo=ipropertyHTML::getfloorplaninfo($fp->floorplan_id);
$this->p= $this->floorplaninfo;
echo $this->loadTemplate('floorplan');
$this->k = 1 - $this->k;
}}
else { // no results tmpl
echo '<h2 class="ip-floorplan-header" style="margin-top:-50px;color:#B20839; font-weight: bold;">Available Floorplans To Build</h2>';
echo '<div class="nofloorplans">No floor plans are available to build at the time. Check back soon!</div>';
}