Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 页面嵌入数组问题

[复制链接]
mlang 发表于 2013-5-29 23:11:49 | 显示全部楼层 |阅读模式
怎么在[array viewthread_sidebottom/0]嵌入东西啊 ;
不知道怎么用数组嵌入的  请大家帮忙给个例子 谢谢
要命的酒鬼 发表于 2013-5-30 03:53:40 | 显示全部楼层
本帖最后由 要命的酒鬼 于 2013-5-30 12:17 编辑

public function viewthread_sidebottom_output(){
 global $postlist;
 $i = 0;
 foreach($postlist as $pid => $value){
  $output[ = $value['authortitle'];//显示用户组名称
  $i++;
 }
 return $output;
}

回复

使用道具 举报

 楼主| mlang 发表于 2013-5-30 11:46:51 | 显示全部楼层
要命的酒鬼 发表于 2013-5-30 03:53
public function viewthread_sidebottom_output(){
 global $postlist;
 foreach($postlist as $pid => ...

还是不行啊
回复

使用道具 举报

要命的酒鬼 发表于 2013-5-30 12:17:15 | 显示全部楼层

不好意思,修正了。
回复

使用道具 举报

離れての時間 发表于 2013-8-26 22:41:36 | 显示全部楼层
要命的酒鬼 发表于 2013-5-30 12:17
不好意思,修正了。

依然不行啊
前辈是不是想表达这个?
  1. public function viewthread_sidetop_output(){
  2.                         global $postlist;
  3.                         $i = 0;
  4.                         foreach($postlist as $pid => $value){
  5.                                 $output[color=Red][$i][/color]= $value['authortitle'];
  6.                                 $i++;
  7.                                
  8.                                 }
  9.                                 return $output;
  10.                                
  11.                                 }
复制代码
可是我本地测试他还是不在数组位置出现啊
回复

使用道具 举报

離れての時間 发表于 2013-8-26 22:42:49 | 显示全部楼层
额,这个↓,上面那个成了插入代码了
public function viewthread_sidetop_output(){
                        global $postlist;
                        $i = 0;
                        foreach($postlist as $pid => $value){
                                $output[$i]= $value['authortitle'];
                                $i++;
                                
                                }
                                return $output;
                                
                                }
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-21 19:35 , Processed in 0.587737 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表