开发者

How can I print all the values of an array? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 8 years ago.

开发者_Python百科 Improve this question

I have an array and print_r won't display the raw text, how can I print all the values in an array (e.g. pie)


So many ways to do it...

foreach ($array as $item) {
    echo $item;
}

echo join(', ', $array);

array_walk($array, create_function('$a', 'echo $a;'));


Maybe you just need some <pre> tags:

echo '<pre>';
print_r($arr);
echo '</pre>';


<?php
$len=count($pie);
for ($i=0;$i<$len;$i++)
   echo $pie[$i];
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜