Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


Php Programming Code Examples

Php > Arrays Code Examples

The meaning of your name

The meaning of your name Well it's nothing really serious, but just if you want to have a PHP break for example : # 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 :) * * @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("Yellow"); ?>