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';...