Share a PHP definition function code, php definition function
Post the code first
Copy code The code is as follows:
Function table(){
echo "
";
echo "This is the title of the table
";
for($out=0; $out < 10; $out++ ){
$bgcolor = $out%2 == 0 ? "#ffffff" : "green";
$fontcolor = $out%2 == 0 ? "#ffffff" : "#000000";
echo "";
for($in=0;$in<10;$in++){
echo "".($out*10+$in)." | ";
};
echo "
";
};
echo "
";
}
table();
?>
This is a piece of PHP code that defines functions
tips:
1. Pay attention to the syntax format of PHP
2. Pay attention to the way of inserting Html code in PHP
3. When using for loop, be careful to think clearly about the difference between the outer loop and the inner loop
http://www.bkjia.com/PHPjc/960704.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/960704.htmlTechArticleShare a PHP definition function code, php definition function first paste the code and copy the code as follows: php function table() { echo "table align='center' border='1' width='600' cellspacing='0';...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn