PHP code example of sherifsheremetaj / cars
1. Go to this page and download the library: Download sherifsheremetaj/cars 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/ */
sherifsheremetaj / cars example snippets
use SherifSheremetaj\Cars\Enums\DataTypes;
use SherifSheremetaj\Cars\Manufactures;
#JSON data
$manufactures = new Manufactures();
$data = $manufactures->getManufactures(DataTypes::JSON);
echo $data . PHP_EOL;
#CSV data
$manufactures = new Manufactures();
$data = $manufactures->getManufactures(DataTypes::CSV);
echo $data . PHP_EOL;
#XML data
$manufactures = new Manufactures();
$data = $manufactures->getManufactures(DataTypes::XML);
echo $data . PHP_EOL;
use SherifSheremetaj\Cars\CarTypes;
use SherifSheremetaj\Cars\Enums\DataTypes;
#JSON data
$carTypes = new CarTypes();
$data = $carTypes->getTypes(DataTypes::JSON);
echo $data;
#CSV data
$carTypes = new CarTypes();
$data = $carTypes->getTypes(DataTypes::CSV);
echo $data;
#XML data
$carTypes = new CarTypes();
$data = $carTypes->getTypes(DataTypes::XML);
echo $data;
__DIR__ . '/data/....';