代码对应的php问题

WBOY
Release: 2016-06-23 14:23:30
Original
921 people have browsed it

     $html = str_replace('{标题}' , $this->cache['keys'][$this->id], $html);
     $this->cache['kexs'] 我需要把这加上去 谁能帮助我啊
     


回复讨论(解决方案)

不明白是什么意思?
$this->cache['kexs'] 不是一个数组么

不明白是什么意思?
$this->cache['kexs'] 不是一个数组么

 $html = str_replace('{标题}' , $this->cache['keys'][$this->cache['kexs']][$this->id], $html);
我这样加上去不正确啊

你 print_r($this->cache['kexs']); 贴出结果
然后再说明要把那些内容替换进去


不明白是什么意思?
$this->cache['kexs'] 不是一个数组么

 $html = str_replace('{标题}' , $this->cache['keys'][$this->cache['kexs']][$this->id], $html);
我这样加上去不正确啊

  $html = str_replace('{标题}' , $this->cache['keys'][$this->id], $html);
  $html = str_replace('{标题1}' , $this->cache['kexs'][$this->id], $html);
这样能显示  keys 对应的 ID  和 kexs对应的ID是一样的 我就是想
keys 和 kexs   用一组输出去 比如
  $html = str_replace('{标题}' , $this->cache['keys'][$this->id][$this->cache['keys'][$this->id]]], , $html);

只不过我这样加进去不显示

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template