By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,846 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,846 IT Pros & Developers. It's quick & easy.

Why do i get a syntax error when i try to run this code?

P: 5
Expand|Select|Wrap|Line Numbers
  1. x=3
  2. title = "PHP Programing"
  3. author = "LERDORF"
  4. publisher = "oreily"
  5. major = "cent"
  6. outfile = open("book.html","w")
  7. outfile.write ('<html>\n')
  8. outfile.write ('     <body>\n')
  9. while ( x > 1 ):
  10.     outfile.write('     <p class= "title">' + title +'</p>\n')
  11.     outfile.write('     <p class= "author">' + author +'</p>\n')
  12.     outfile.write('     <p class= "publisher">' + publisher '</p>\n')
  13.     x = x - 1
  14. outfile.write ('     </body>\n')
  15. outfile.write ('     </body>\n')
  16. outfile.close()
  17.  
Oct 11 '10 #1
Share this Question
Share on Google+
1 Reply


P: 5
I found the missing plus sign.
thanks
scott
Oct 11 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.