Code:
x=3
title = "PHP Programing"
author = "LERDORF"
publisher = "oreily"
major = "cent"
outfile = open("book.html","w")
outfile.write ('<html>\n')
outfile.write (' <body>\n')
while ( x > 1 ):
outfile.write(' <p class= "title">' + title +'</p>\n')
outfile.write(' <p class= "author">' + author +'</p>\n')
outfile.write(' <p class= "publisher">' + publisher '</p>\n')
x = x - 1
outfile.write (' </body>\n')
outfile.write (' </body>\n')
outfile.close()
Comment