Home > Backend Development > PHP Tutorial > php-各位大神,小弟请教一个PHP数组输出的问题,十万火急!!!!!!!!!!!!!!实在是没分了。。——CSDN问答频道

php-各位大神,小弟请教一个PHP数组输出的问题,十万火急!!!!!!!!!!!!!!实在是没分了。。——CSDN问答频道

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:00:58
Original
1026 people have browsed it

php

<code>  $recent_posts = wp_get_recent_posts( 'orderby=rand&showposts=' . $number . '&category=' . $fenlei  );         //遍历出每一篇文章。          foreach( $recent_posts as $recent ){            $a = '<li>
<a href="'%20.%20get_permalink(%24recent%5B" id . title="Look '.esc_attr($recent[" post_title>' .   $recent["post_title"].'</a> </li> ';         $b[] = $a;               }          return  $b[0].$b[1].$b[2].$b[3].$b[4];         }   </code>
Copy after login

小弟写了这么个遍历文章的玩意,但是有个不解的地方就是,小弟在用数组接收遍历的内容后,通过这种 return $b[0].$b[1].$b[2].$b[3].$b[4]; 方式能把数组返回显示出来,但是直接用 return $b; 就显示 Array ,实在是无语了,小弟今天才学的PHP,望各位大神指教

Related labels:
php
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