PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $json = '{ "value":[ { "vm": "vm-1060", "name": "node10", "cpu_count": 16 }, { "vm": "vm-1063", "name": "node2", "cpu_count": 16 }, { "vm": "vm-1064", "name": "node0", "cpu_count": 16 } ] }'; // convert into php array $arr = json_decode($json, true); $values = array_column($arr['value'], 'vm'); print_r($values);
Show:  
Copy Clear