當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Space::array_multi2single方法代碼示例

本文整理匯總了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;
 }
開發者ID:renduples,項目名稱:alibtob,代碼行數:28,代碼來源:product.php

示例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;
 }
開發者ID:renduples,項目名稱:alibtob,代碼行數:35,代碼來源:company.php


注:本文中的Space::array_multi2single方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。