PHP code example of gravitywiz / faker
1. Go to this page and download the library: Download gravitywiz/faker 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/ */
gravitywiz / faker example snippets
$gwiz_faker = new \GWiz_Faker();
$form = GFAPI::get_form( 123 );
$entries_to_generate = 10;
for ( $i = 0; $i < $entries_to_generate; $i++ ) {
$entries[] = $gwiz_faker->generate_entry( $form );
}
// Add the entries to the database.
foreach ( $entries as $entry ) {
GFAPI::add_entry( $entry );
}