CalmSoul
asked on
JSON output modifications
I have the following code, I need to only get [list] from JSON response ... not everything
Here is the output:
<?php
error_reporting(E_ALL);
$urls = array(
'https://api.dailymotion.com/user/cricshare/videos?page=1&limit=100',
'https://api.dailymotion.com/user/cricshare/videos?page=2&limit=100',
'https://api.dailymotion.com/user/cricshare/videos?page=3&limit=100'
);
$sets = array();
foreach ($urls as $url) {
$json = file_get_contents($url);
$data = json_decode($json);
$sets[] = $data;
}
$new = json_encode($sets, JSON_PRETTY_PRINT);
echo '<pre>';
echo $new;
?>
Here is the output:
http://joomclan.com/json2db/json_read.php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points - it's a great question, ~Ray
ASKER