SEARCH YOUR SOFTWARES IN THIS SITE........

Thursday, November 26, 2009

Learn how to make PHP Functions...


function check_age($age) {
if ($age > 21) {
return 1;
} else {
return 0;
}
}
//usage:
if(check_age($age)) {
echo "You may enter!";
} else {
echo "Access Not Allowed!";
exit();
}
The function would be called from within your script at the appropriate time, using the following syntax:
$age = 10;
check_age($age);


Here are some examples
function simpletable($text) {

print("
");

print("");

print("
$text
");

}

phpinfo( )

phpinfo() is a very useful function that allows you to see what version of PHP is running on your Web server, as well as all of the specific settings that are enabled in that version.

phpinfo();
?>

0 comments:

Post a Comment