【发布时间】:2017-03-04 21:51:34
【问题描述】:
我有问题需要这样显示位置:
-国家
--区域
---城市
-国家
--区域
---城市
我有国家和地区,但我不知道如何按地区显示城市。
这是我的代码:`
<?php if(osc_count_countries() > 0 ) { ?>
<div class="box location">
<h3><strong><?php _e("Location", 'bender') ; ?></strong></h3>
<ul>
<?php while(osc_has_countries() ) { ?>
<li><a href="<?php echo osc_country_url( array( 'sCountry' => osc_list_country_code() ) ) ; ?>"><?php echo osc_country_name() ; ?> <em>(<?php echo osc_country_items() ; ?>)</em></a></li>
<?php if (osc_country_name() =='Austria') { ?>
<ul>
<?php View::newInstance()->_erase('regions');
View::newInstance()->_exportVariableToView('regions', Search::newInstance()->listRegions('AT', '>') ) ;
if(osc_count_regions('AT') > 0 ) {
while(osc_has_regions('AT') ) { ?>
<li><a href="<?php echo osc_search_url(array('sRegion' => osc_region_name()));?>"><?php echo osc_region_name() ; ?> <em>(<?php echo osc_region_items() ; ?>)</em></a></li>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>`
请帮帮我
【问题讨论】:
标签: php mysql location osclass