0
I have a link that I believe is an API, and I need to pick up the news (as if it were a feed) but I’ve done several foreach I can’t associate to bring the text I want inside PHP, follows the link from the api: https://www.caseih.com/latam/pt-br/_layouts/15/Caseih/Servicemanager.aspx? d=tl-news-release&sort=desc&count=20, someone can help me?
PHP:
$json_file = file_get_contents("https://www.caseih.com/latam/pt-br/_layouts/15/CaseIH/ServiceManager.aspx?d=tl-news-release&sort=desc&count=20");
$json_output = json_decode($json_file, true);
echo '<pre>';
var_dump( $json_output );
foreach ($json_output as $resultado){
foreach ($resultado as $items){
var_dump($items);
}
}
Then when I try to add ->title or ->date it returns me error, I don’t know if it’s because I didn’t associate wrong or something like..
Put your last attempt on the question and describe what happened, please, to get a sense of what you’ve done and not have to start from scratch.
– Woss
I added the code..
– TheOps Brasil
You could help me @Andersoncarloswoss ?
– TheOps Brasil
The idea arose from this theme but is not equal, did not apply my question..
– TheOps Brasil
It’s the same, yes. Just fit the read JSON. You know the JSON format?
– Woss