Skip to content

Instantly share code, notes, and snippets.

@brianherbert
Created June 29, 2010 18:44
Show Gist options
  • Save brianherbert/457608 to your computer and use it in GitHub Desktop.
Save brianherbert/457608 to your computer and use it in GitHub Desktop.
Simple Name Generator
<?php
require 'name_generator.php';
echo 'Random Name: '.name('boy');
?>
<?php
function name($type){
if($type == 'boy'){
$names = array('Brian','David','Caleb','Henry','Patrick','Erik','Limo');
}else{
$names = array('Juliana','Ory','Linda');
}
return $names[array_rand($names)];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment