example 1
completely random profile
output
Array
(
[first_name] => Kellia
[last_name] => Hamblin
[user_name] => khamblin
[full_name] => Kellia Hamblin
[gender] => f
[email] => khamblin25321@yahoo.com
[street] => 2373 Baronik Drive #653
[zip] => 34231
[city] => South Trail
[state] => FL
[phone] => (850) 555-1681
[fav_color] => 07f7cd
)
code
// Completely Random Profile
// New Object
$Databug = new Databug();
// Create Basic Profile
$Databug->cx_profile();
// Load Extra Functions
$Databug->load_extra_fx();
// Load Profile into Array
$DATA1 = $Databug->get_profile();
// Add Random Color to Data Array
$DATA1['fav_color'] = set_random_color();
// Print Array
$profile1 = print_r($DATA1,1);
completed in 0.2414 s
example 2
Californian profile with MySQL insert statment
output
Array
(
[first_name] => Heindrick
[last_name] => Downey
[user_name] => hdowney
[full_name] => Heindrick Downey
[gender] => m
[email] => hdowney28000@aol.com
[street] => 8561 Bass Circle #473
[zip] => 91320
[city] => Newbury Park
[state] => CA
[phone] => (650) 555-7291
)
SQL Statement
INSERT INTO table (`id`, `first_name`,`last_name`,`city`,`state`) VALUES (null, 'Heindrick', 'Downey', 'Newbury Park', 'CA');
code
// Create Californian Profile and Put in MySQL Insert Statement
// New Object
$Databug = new Databug();
// Uncomment to Turn on Debug Mode
//$Databug->set_debug_mode(1);
// Construct Profile by Zip Range (CA: 90000-96199)
$Databug->cx_profile_by_zip_range(90000, 96199, $gender='*', $first_name='*', $last_name='*');
// Load Profile into Array
$DATA = $Databug->get_profile();
// Print Array
$profile2 = print_r($DATA,1);
// Add SQL Insert Statement
$sql = "INSERT INTO table (`id`, `first_name`,`last_name`,`city`,`state`) VALUES (null, '{$DATA['first_name']}', '{$DATA['last_name']}', '{$DATA['city']}', '{$DATA['state']}');";
completed in 0.2237 s