0) { $items = explode(',', $obj); $item = $items[0]; $id = explode('=', $items[0], 2); if (count($id) == 1) $name = $id[0]; else $name = $id[0].$id[1]; if (strlen($name) == 0) $name = 'null'; if (isset($data[$name])) { $num = 1; while (isset($data[$name.$num])) $num++; $name .= $num; } $counter = 0; foreach ($items as $item) { $id = explode('=', $item, 2); if (count($id) == 2) $data[$name][$id[0]] = $id[1]; else $data[$name][$counter] = $id[0]; $counter++; } } } return $data; } return null; } # $r = request('apiversion'); echo print_r($r, true)."\n"; # $r = request('dev'); echo print_r($r, true)."\n"; # $r = request('pool'); echo print_r($r, true)."\n"; # $r = request('summary'); echo print_r($r, true)."\n"; # ?>