Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial php 如何读取这些数据呢??

php 如何读取这些数据呢??

Jun 23, 2016 pm 02:18 PM

以下内容是,print_r  出来的数据,、
如何 将[listing] => Array() 下的数据,循环读出来??





Array
(
    [status] => 1
    [info] => 
    [data] => Array
        (
            [user_info] => Array
                (
                    [uid] => 1
                    [id] => 1
                    [fuid] => 0
                    [fuids] => 0
                    [gid] => 1
                    [user] => admin
                    [password] => dd8eb031789b6a0664709455e7d512ce
                    [api_password] => dd8eb031789b6a0664709455e7d512ce
                    [status] => 1
                    [sort] => 0
                    [dateline] => 1291190509
                    [question] => 0
                    [hash_answer] => 
                    [domains] => xxx.com *.xxx.com
                    [address] => XX省XX市XX区XX街XX号
                    [company_name] => 自己的路
                    [company_address] => XX市XX路XX楼XX号
                    [company_tel] => 02088888888
                    [company_website] => http://www.xxx.com
                    [truename] => 李某张三
                    [card_number] => 4088***************
                    [email] => 111111111@qq.com
                    [qq] => 000000
                    [description] => 注释
                    [balance] => 0
                    [groupId] => 1
                    [groupName] => 超级管理员
                    [limits] => sys_admin
                    [suids] => 1
                    [sys_admin] => 1
                )

            [begin_time] => 1375598513.55
            [timestamp] => 1375598513
            [is_login_module] => 1
            [mc] => 25237417b6e0a1fbd6
            [module_js_exists] => 1
            [ftp_root_wrong] => 0
            [aName] => FTP列表
            [page] => 2 条记录 1/1 页       
            [listing] => Array
                (
                    [0] => Array
                        (
                            [id] => 1
                            [uid] => 1
                            [order_id] => 0
                            [sid] => 1
                            [name] => zzcms_com
                            [password] => 6a2c8224f080958ac4d7ef7d8673effd
                            [dateline] => 1371426776
                            [dateline_update] => 1375596219
                            [status] => 1
                            [sort] => 2000
                            [dir] => /home/xxx_com-20130617-hQP/
                            [master] => 0
                            [description] => 
                            [user] => zijidelu
                            [user_email] => service@zijidelu.org
                            [total_size] => 0
                            [solutions_name] => 旗舰套餐
                            [ftp_DLBandwidth] => 0
                            [ftp_ULBandwidth] => 0
                            [ftp_QuotaSize] => 0
                            [ftp_QuotaFiles] => 0
                            [ftp_count] => 0
                        )

                    [1] => Array
                        (
                            [id] => 2
                            [uid] => 1
                            [order_id] => 0
                            [sid] => 1
                            [name] => zijidelu
                            [password] => WiSTbUcfWUqdBiovKOYMEDeqPuOPMezh
                            [dateline] => 1371426777
                            [dateline_update] => 1371426777
                            [status] => 1
                            [sort] => 2000
                            [dir] => /home/xxx_com-20130617-hQP/
                            [master] => 1
                            [description] => 
                            [user] => zijidelu
                            [user_email] => service@zijidelu.org
                            [total_size] => 0
                            [solutions_name] => 旗舰套餐
                            [ftp_DLBandwidth] => 0
                            [ftp_ULBandwidth] => 0
                            [ftp_QuotaSize] => 0
                            [ftp_QuotaFiles] => 0
                            [ftp_count] => 0
                        )
                        
                    [2] => Array
                        (
                            [id] => 3
                            [uid] => 1
                            [order_id] => 0
                            [sid] => 1
                            [name] => zijidelu
                            [password] => WiSTbUcfWUqdBiovKOYMEDeqPuOPMezh
                            [dateline] => 1371426777
                            [dateline_update] => 1371426777
                            [status] => 1
                            [sort] => 2000
                            [dir] => /home/xxx_com-20130617-hQP/
                            [master] => 1
                            [description] => 
                            [user] => zijidelu
                            [user_email] => service@zijidelu.org
                            [total_size] => 0
                            [solutions_name] => 旗舰套餐
                            [ftp_DLBandwidth] => 0
                            [ftp_ULBandwidth] => 0
                            [ftp_QuotaSize] => 0
                            [ftp_QuotaFiles] => 0
                            [ftp_count] => 0
                        )

                )

            [total_run_time] => 9.818 s
        )

)


回复讨论(解决方案)

1

foreach($arr['data']['listing'] as $vl){     foreach($vl as $k=>$v) echo $k.'=>'.$v.'<br>';}

Copy after login

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

11 Best PHP URL Shortener Scripts (Free and Premium) 11 Best PHP URL Shortener Scripts (Free and Premium) Mar 03, 2025 am 10:49 AM

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

Working with Flash Session Data in Laravel

Introduction to the Instagram API Introduction to the Instagram API Mar 02, 2025 am 09:32 AM

Introduction to the Instagram API

Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React Build a React App With a Laravel Back End: Part 2, React Mar 04, 2025 am 09:33 AM

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

12 Best PHP Chat Scripts on CodeCanyon

Notifications in Laravel Notifications in Laravel Mar 04, 2025 am 09:22 AM

Notifications in Laravel

See all articles