Code Challenge 1

Posted on 24. Feb, 2010 by admin in Basics


So far we have learned a number of different PHP concepts, and now it is time to test how much you were paying attention. Answer the following questions, and try some of the programming projects below. Don’t cheat!

Questions

Q: Which tags are placed between our PHP code?

Show Answer ▼

Q: Which statement is used to print text to the browser window?

Show Answer ▼

Q: What character must every PHP statement end with?

  1. Quotation Mark
  2. Semicolon
  3. Colon
  4. Period

Show Answer ▼

Q: True or false? A single line comment starts with \\.

Show Answer ▼

Q: Which of the following are incorrect variable names?

  1. A: 1stnumber
  2. B: MyString
  3. C: i_like_wildphp
  4. D: me too

Show Answer ▼

Q: What values can an integer hold? What values can a string hold?

Show Answer ▼

Q: What is the shortest statement to increase a variable by one?

Show Answer ▼

Programming Projects

Project One: Write a script that prints out “WildPHP.com is Cool”

Show Solution ▼

Project Two: Write a script prints out the degrees Celsius, from a given value in Fahrenheit.

Show Solution ▼