2015-04-10から1日間の記事一覧
printやechoを使わずにHTMLタグを記述するには一旦?>で閉じてしまえばいいそうです。 =18): ?> <BODY BGCOLOR =black><FONT color=yellow>夜</font></BODY> =9):?> <BODY BGCOLOR =lime>昼</BODY> =6):?> <BODY BGCOLOR =blue>朝</BODY> 因みに今までは
=12){ print "午後:"; if($time>=18){ print "夜"; }else{ print "昼"; } }else{ print "午前"; if($time>=6){ print "昼"; }else{ print "夜"; } } ?> というifからの2つ分岐とelseからの2つ分岐の4通りの分岐がある構造を考えます。 これは入れ子になって…