関数の作成例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta name="GENERATOR" content="JustSystems Homepage Builder Version 18.0.14.0 for Windows"> <title></title> </head> <body> <?php function fontcolor($moji, $color) { print "<B><FONT color='$color'>" . $moji . "</FONT></B>"; } fontcolor("PHP", "#FF0000"); print "<BR>"; print "PHPはスクリプトと"; fontcolor("HTMLを混在できます!", "#6666FF"); print "<BR>"; ?> </body> </html> |
http://isamstar2.starfree.jp/newpage5.php
htmlのタグを良く知りませんので、例題そのままです。