WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : The meaning of your name
Categories : PHP, Arrays, Misc Click here to Update Your Picture
Ben Yacoub Hatem
Date : Mar 29th 2005
Grade : 3 of 5 (graded 3 times)
Viewed : 3828
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Ben Yacoub Hatem
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

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");
?>



Grab images from one or more URLs and save them to a specified local directory.
Categories : PHP, Filesystem, Strings, Arrays
How to pass an array to a function, or how to define a function wich recieves an array.
Categories : Variables, PHP, Arrays
PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
Categories : PHP, Arrays, Variables
This simple function will take a few arguments and easily set a associative array for each column in a result from a MySQL query
Categories : Databases, PHP, MySQL, 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
Simple PHP Bar Graph using GD library
Categories : PHP, GD image library, Graphics, Arrays
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
A function which places the path and name of all subdirectories into an array
Categories : PHP, Filesystem, Arrays, Directories
columned txt file to array()?
Categories : Arrays, Strings, Regexps, PHP
Human readable PHP password generator
Categories : PHP, Security, Beginner Guides, Arrays
Random text quote
Categories : PHP, Arrays, Beginner Guides
minus - subtract arrays. Send two arrays and get an array with the operation A-B, elements on A that are not included on B.
Categories : PHP, Arrays, Algorithms
Stock quotes from yahoo!
Categories : PHP, Web Services, Arrays
How to display any array in several rows and columns of a table. Not just in one column or in alternate rows. This example shows a nice color table generated with PHP, but can be used with any array values(e.g. Database)
Categories : Arrays, PHP, Miscellaneous, Beginner Guides, Graphics
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
 Jose Santos wrote :1302
This example is very good and interesting.
Is good game to take with friends !!