[ create a new paste ] login | about

Link: http://codepad.org/MYYwOJj2    [ raw code | output | fork ]

PHP, pasted on May 30:
1
2
3
4
5
6
7
8
9
<?php

  $json = '{"feed":[{"ab:test":{"value":"foo"}},{"ab:test":{"value":"bar"}}]}';

  $json_output = json_decode( $json );

  foreach ( $json_output->feed as $feed ) {
      print_r( $feed->{'ab:test'}->value );
  }


Output:
1
foobar


Create a new paste based on this one


Comments: