[ create a new paste ] login | about

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

PHP, pasted on Dec 31:
1
2
3
4
5
6
7
<?php
$array = array(0=>'{"conn_id":"2"}', 1=>'{"conn_id":"5"}' );

foreach($array as $value) {
  $decoded = json_decode($value, true);
  echo $decoded['conn_id']. '<br>';
}


Output:
1
2<br>5<br>


Create a new paste based on this one


Comments: