Jump to content

Recommended Posts

Hi all,

 

This is the output of a json request to my server, which is currently stored in an array by single characters.

{ " r e s u l t " : { " s t a t u s " : 1 , " s t a t u s m s g " :null},"service":[
{"display_name":"ClamAV Daemon","installed":0,"enabled":1,"monitored":0,"name":"clamd"},
{"display_name":"cPanel Log and Bandwidth Processor","installed":1,"enabled":1,"monitored":0,"name":"cpanellogd"},
{"display_name":"cPanel DAV Daemon","installed":1,"enabled":1,"monitored":1,"name":"cpdavd"},
{"display_name":"cPanel Daemon","installed":1,"enabled":1,"monitored":1,"name":"cpsrvd"},
{"display_name":"Entropy Chat Server","installed":1,"enabled":0,"monitored":0,"name":"entropychat"},
{"display_name":"Exim Mail Server","installed":1,"enabled":1,"monitored":1,"name":"exim"},
{"display_name":"Ftp Server","installed":1,"enabled":1,"monitored":1,"name":"ftpd"}, 
{"display_name":"Apache Web Server","installed":1,"enabled":1,"monitored":1,"name":"httpd"}, 
{"display_name":"IMAP Server","installed":1,"enabled":1,"monitored":1,"name":"imap"}, 
{"display_name":"Interchange Server","installed":0,"enabled":0,"monitored":0,"name":"interchange"}, 
{"display_name":"IP Aliases","installed":1,"enabled":1,"monitored":0,"name":"ipaliases"},
{"display_name":"Melange Server","installed":1,"enabled":0,"monitored":0,"name":"melange"},
{"display_name":"MySQL Server","installed":1,"enabled":1,"monitored":1,"name":"mysql"},
{"display_name":"DNS Server","installed":1,"enabled":1,"monitored":1,"name":"named"},
{"display_name":"POP3 Server","installed":0,"enabled":1,"monitored":0,"name":"pop"},
{"display_name":"PostgresSQL Server","installed":1,"enabled":1,"monitored":0,"name":"postgresql"},
{"display_name":"TaskQueue Processor","installed":1,"enabled":1,"monitored":0,"name":"queueprocd"},
{"display_name":"rsyslogd","installed":1,"enabled":0,"monitored":0,"name":"rsyslogd"},
{"display_name":"SpamAssassin Server","installed":1,"enabled":1,"monitored":1,"name":"spamd"},
{"display_name":"SSH Daemon","installed":1,"enabled":1,"monitored":0,"name":"sshd"},
{"display_name":"System Logger Daemon","installed":0,"enabled":1,"monitored":0,"name":"syslogd"},
{"display_name":"TailWatch Daemon","installed":1,"enabled":1,"monitored":0,"name":"tailwatchd"},
{"display_name":"Tomcat Server","installed":0,"enabled":1,"monitored":0,"name":"tomcat"}]}

 

Is there a way of putting one character on each line so I know what var() matches which character?

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/195585-output-of-an-array/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.