PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $url="https://rus.postimees.ee/rss"; $data=file_get_contents($url); $xml = simplexml_load_string($data); $json = json_encode($xml); $array = json_decode($json, true); $data=$array['channel']; print_r(array_count_values($data['item'])); function getCategory($array) { $category=[]; foreach($array as $k=>$v) { if(is_array($v['category'])){ # if(!in_array(end($v['category']),$category)){ $category[]=end($v['category']); # } } } return $category; }
Show:  
Copy Clear