|
|
|
|
|
|
| |
Well it's nothing really serious, but just if you want to have a PHP break for example :
The meaning of your name Hatem
# You are not judgmental
# You can be very quiet when you have something on your mind
# You have an attitude, a big one
# You are a very exciting person
# Success comes easily to you
| <?php
/**
* themeaningof() Just return the meaning of your name :)
*
* @author Hatem <info@phptunisie.net>
* @param string $name
* @return
**/
function themeaningof($name = ""){
$names = array('A'=>'You can be very quiet when you have something on your mind',
'B'=>'You are always cautious when it comes to meeting new people',
'C'=>'You definitely have a partier side in you, don\'t be shy to show it',
'D'=>'You have trouble trusting people',
'E'=>'You are a very exciting person',
'F'=>'Everyone loves you',
'G'=>'You have excellent ways of viewing people',
'H'=>'You are not judgmental',
'I'=>'You are always smiling and making others smile',
'J'=>'Jealously',
'K'=>'You like to try new things',
'L'=>'Love is something you deeply believe in',
'M'=>'Success comes easily to you',
'N'=>'You like to work, but you always want a break',
'O'=>'You are very open-minded',
'P'=>'You are very friendly and understanding',
'Q'=>'You are a hypocrite',
'R'=>'You are a social butterfly',
'S'=>'You are very broad-minded',
'T'=>'You have an attitude, a big one',
'U'=>'You feel like you have to equal up to people\'s standards',
'V'=>'You have a very good physique and looks',
'W'=>'You like privacy',
'X'=>'You never let people tell you what to do',
'Y'=>'You cause a lot of trouble',
'Z'=>'You\'re always fighting with someone'
);
$uname = strtoupper($name);
$result = array();
for($i = 0; $i < strlen($uname); $i++){
if (array_key_exists($uname[$i], $names)) {
$result[$uname[$i]] = "<li>".$names[$uname[$i]]."</li>\n";
}
} // for
return "<b>The meaning of your name $name</b>".implode('',$result);
}
echo themeaningof("Hatem");
?> | | |
|
| clearing variables in php3 Categories : Variables, Arrays, PHP | | | Display list of files within current and subdirectories (recursively) showing
each file as an anchored link and each directory as a category header. Categories : Filesystem, Directories, Arrays, PHP | | | Stock quotes from yahoo! Categories : PHP, Web Services, Arrays | | | Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
Categories : PHP, Directories, Variables, Arrays | | | XML To Array Categories : PHP, PHP Classes, XML, Arrays | | | BBCode Formatting String Categories : PHP, HTML, Regexps, Arrays | | | Array Insertion Categories : PHP, PHP Classes, Arrays | | | PHP Script to find url links in a page Categories : PHP, URLs, Regexps, Arrays | | | Tag content retrieval from websites with preg_match Categories : PHP, Regexps, Arrays, HTML and PHP | | | Array values from javascript to php Categories : PHP, Java Script, Arrays | | | Weighted Random - Random Scripts usually chose one out of each item, and each item have an equal chance to be chosen. But what if you want an item to be chosed more frequently than other? Categories : PHP, Math., Arrays | | | This gets the http response headers for a given url and returns them in an assoc array. i.e. to test if a url exists: $array = get_http_headers($url); if($array[result]=200) { } Categories : HTTP, Arrays, PHP | | | Beginners Array Functions Categories : PHP, Beginner Guides, Arrays | | | How to pass an array from one PHP Script to another via an HTML form Categories : PHP, HTML and PHP, Arrays | | | How to load a query result into a PHP Array Categories : PHP, Databases, Arrays, MySQL | |
| | | | Jose Santos wrote :1302
This example is very good and interesting.
Is good game to take with friends !!
| |
|
|
|