php function PrintArray () Disadvantage: Cannot output object Print_r () can output object
- PrintArray ($_request);
- function PrintArray ($strs,
$numbers = 0) {
- $ Space = '' ;//The space before the output character
- For ($i=0; $i<$numbers * 2; $i + +)
- $space . = ' ' ;
- Echo ' Array <br/> '. $space. ' (<br/>';
- foreach ($strs as $key=> $value) {
- if (Is_array ($value)) {
- $numbers + +;
- Echo $space. ' ['. $key. '] => ';
- PrintArray ($value, $numbers);
- } else {
- echo $space. ' ['. $key. '] => '
. $value. ' <br/> ';
- }
- }
- Echo $space. ')<br/>';
- }
The contents of the PHP function PrintArray () output are as follows
- Array
- (
- [ECS] = > Array
- (
- [Visit_times] = > 2
- )
- [Uchome_loginuser] = > Yoyorose
- [Rrm_cookietime] = > 2592000
- [Rrm_indextype] = > Classics
- [Uchome_mytemplate] = > Blue
- [Rrm_loginuser] = > Yoyorose
- [Rrm_activationauth] = > 6f474pfbxw4ov
/xdtu+eyomuxprcx6a+0gmr4sur/8glagurxa
- [Zdedebuggerpresent] = > php, phtml,php3
- [Uchome_auth] = > 821bvb9qfgrh+4uv07tq6q
Cryk9oueem/j5gqxcjfmuzh3gptw6dp3phcqpufv
Znyy3qctuw7h1vrlxeemqg
- [Uchome_viewuids] = > 10_1_2_4_11_8_9_7
- [Uchome_space_top_show] = > 1
- [Uchome_space_top_experience] = > 2
- )
http://www.bkjia.com/PHPjc/446020.html www.bkjia.com true http://www.bkjia.com/PHPjc/446020.html techarticle php function PrintArray () Disadvantage: Cannot output object Print_r () can output object PrintArray ($_request); Functionprintarray ($strs, $ numbers = 0) {$ space = ";//The space before the output character ...