本文整理汇总了PHP中Space::array_multi2single方法的典型用法代码示例。如果您正苦于以下问题:PHP Space::array_multi2single方法的具体用法?PHP Space::array_multi2single怎么用?PHP Space::array_multi2single使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Space
的用法示例。
在下文中一共展示了Space::array_multi2single方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Search
function Search($firstcount, $displaypg)
{
global $cache_types;
uses("space", "industry", "area");
$space = new Space();
$area = new Areas();
$industry = new Industries();
$cache_options = cache_read('typeoption');
$area_s = $space->array_multi2single($area->getCacheArea());
$industry_s = $space->array_multi2single($area->getCacheArea());
$result = $this->findAll("*,name AS title,content AS digest", null, null, $this->orderby, $firstcount, $displaypg);
while (list($keys, $values) = each($result)) {
$result[$keys]['typename'] = $cache_types['productsort'][$values['sort_id']];
$result[$keys]['thumb'] = pb_get_attachmenturl($values['picture'], '', 'small');
$result[$keys]['pubdate'] = df($values['begin_time']);
if (!empty($result[$keys]['area_id'])) {
$r1 = $area_s[$result[$keys]['area_id']];
}
if (!empty($result[$keys]['cache_companyname'])) {
$r2 = "<a href='" . $space->rewrite($result[$keys]['cache_companyname'], $result[$keys]['company_id']) . "'>" . $result[$keys]['cache_companyname'] . "</a>";
}
if (!empty($r1) || !empty($r2)) {
$result[$keys]['extra'] = implode(" - ", array($r1, $r2));
}
$result[$keys]['url'] = $this->getPermaLink($values['id']);
}
return $result;
}
示例2: Search
function Search($firstcount, $displaypg)
{
global $cache_types;
uses("space", "industry", "area");
$space = new Space();
$area = new Areas();
$industry = new Industries();
$cache_options = cache_read('typeoption');
$area_s = $space->array_multi2single($area->getCacheArea());
$industry_s = $space->array_multi2single($industry->getIndustry());
$result = $this->findAll("*,name AS title,description AS digest", null, null, $this->orderby, $firstcount, $displaypg);
if (!isset($_PB_CACHE['membergroup'])) {
require CACHE_PATH . "cache_membergroup.php";
}
while (list($keys, $values) = each($result)) {
$r = array();
$result[$keys]['pubdate'] = df($values['created']);
$result[$keys]['typename'] = $cache_options['manage_type'][$values['manage_type']];
$result[$keys]['thumb'] = $result[$keys]['logo'] = pb_get_attachmenturl($values['picture'], '', 'small');
$result[$keys]['gradeimg'] = URL . 'images/group/' . $_PB_CACHE['membergroup'][$result[$keys]['cache_membergroupid']]['avatar'];
$result[$keys]['gradename'] = $_PB_CACHE['membergroup'][$result[$keys]['cache_membergroupid']]['name'];
if (!empty($result[$keys]['area_id'])) {
$r[] = $area_s[$result[$keys]['area_id']];
}
if (!empty($result[$keys]['industry_id'])) {
$r[] = $industry_s[$result[$keys]['industry_id']];
}
$r[] = L("integrity_index", "tpl") . "(" . $result[$keys]['cache_credits'] . ")";
if (!empty($r)) {
$result[$keys]['extra'] = implode(" - ", $r);
}
$result[$keys]['url'] = $space->rewrite($values['member_id'], $values['id']);
}
return $result;
}