I'm working on a quick project that will call a webservice, to return data. This is written in php, how do I format the output to make it readable?
the output returns this:
object(stdClass)#2 (2) {
  ["pid"]=>
  string(9) "12345678"
  ["quantities"]=>
  object(stdClass)#3 (1) {
    ["quantity"]=>
    array(2) {
      [0]=>
      object(stdClass)#4 (2) {
        ["_"]=>
        string(5) "2.000"
        ["sid"]=>
        string(2) "001"
      }
      [1]=>
      object(stdClass)#5 (2) {
        ["_"]=>
        string(5) "2.000"
        ["sid"]=>
        string(2) "002"
      }
    }
  }
}
I want the output to look like this:
pid: 12345678
sid: 001  quantity: 2.00
sid: 002  quantity: 1.00
Can someone help me to make the output format readable for users? I have no clue how to do it in php. Appreciate everyone's help.
 
     
    