Home  >  Article  >  Backend Development  >  php语句拼html语句的顺序问题

php语句拼html语句的顺序问题

WBOY
WBOYOriginal
2016-06-06 20:31:471004browse

<code>      $pageList .= {$json['name']}
html;
            }
</code>

我用这种方法拼出来的顺序与我想要的顺序想法,有没有什么办法让它顺序颠倒呢

回复内容:

<code>      $pageList .= {$json['name']}
html;
            }
</code>

我用这种方法拼出来的顺序与我想要的顺序想法,有没有什么办法让它顺序颠倒呢

另外一种方法是:

<code>  $pageList = {$json['name']}
html
             . $pageList;
</code>

注意字符串结尾的时候,html要单独占一行。

<code>php</code><code>$arr = array_reverse($arr);
foreach($arr as $json){
 $pageList .= {$json['name']}
html;
}
</code>

感觉问题都没描述清楚,不知道你是什么意思

Statement:
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