PHP code example of petalst / fake-team

1. Go to this page and download the library: Download petalst/fake-team 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/ */

    

petalst / fake-team example snippets


$faker = (new \Faker\Factory())::create();
$faker->addProvider(new \Faker\Provider\FakeTeam($faker));


// Generate team name as a string
echo $faker->team; // Bears

// Can also be added to a city name like this
echo $faker->city .' '. $faker->team; // Chicago Bulls