php-fakerHow can I generate a business name using PHP Faker?
Using PHP Faker you can easily generate business names with a few lines of code.
Here is an example code block:
<?php
$faker = Faker\Factory::create();
echo $faker->company;
This code will generate an output like this:
Smith-Mcguire
The code consists of three parts:
$faker = Faker\Factory::create();
- this creates a Faker instance.echo $faker->company;
- this prints out a random business name.- The closing
?>
tag - this is the closing tag for the PHP code.
For more information on using PHP Faker, you can check out the official documentation here.
More of Php Faker
- How do I generate a zip file using PHP Faker?
- How can I generate a zip code using Laravel Faker?
- How can I generate fake data in XLSX format using PHP Faker?
- How do I generate a random zip code using PHP Faker?
- How can I specify the word length when using Laravel Faker?
- How do I set the locale for PHP Faker?
- How do I generate a fake year in Laravel using Faker?
- How do I check which version of Laravel Faker I am using?
- How do I generate a valid VAT number using Laravel Faker?
- How can I generate unique data with Laravel Faker?
See more codes...