开发者

how to display array elements php

For example; in PHP the au开发者_运维问答to-global $_SERVER. How do I display the elements or keys that it has?

I am unable to find out how online.


$keys = array_keys($somearray);

Is that what you're looking for? Or are you just looking for $somearray['somekey']?


For debugging I assume?

There are a couple ways, but I always do something like this:

die(print_r($_SERVER));


Look into var_dump() and print_r. Both options should provide what you're looking for without having additional clarification for your request.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜