PHP code example of astronati / world-cups-data-response-parser
1. Go to this page and download the library: Download astronati/world-cups-data-response-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
astronati / world-cups-data-response-parser example snippets
use WCDRP\Response\ResponseParser;
...
// Obtain a Response
$apiResponse = ... // Save this the response from the World Cups Data API
$response = ResponseParser::create($apiResponse);
...
// Get first round
$round = $response->getRounds()[0];
echo $round->getNumber(); // 1...