PHP Practice Quiz Questions

15 Questions | Total Attempts: 230

Settings
Please wait...
PHP Quizzes & Trivia

PHP Quiz


Questions and Answers
  • 1. 
    Type a proper sting variable
  • 2. 
    Write a simple if command
  • 3. 
    Write the dynamic variable to show the date
  • 4. 
    In your own words, Why do we use PHP to create sites?
  • 5. 
    What is the variable to syntax to get a variable from the URL (address bar)
  • 6. 
    PHP uses functions to simplify repetitive tasks and allow for greater variation.
    • A. 

      True

    • B. 

      False

  • 7. 
    What symbol is used to end a command in a PHP script
    • A. 

      :

    • B. 

      ;

    • C. 

      :)

    • D. 

      .

  • 8. 
    Which statement is used when you want to have 2 possible outcomes. 
    • A. 

      If/elseif/else

    • B. 

      If/else

    • C. 

      If

  • 9. 
    What is the correct syntax for a function (not calling the function)?
    • A. 

      Car(...){...}

    • B. 

      Car{...}(...)

    • C. 

      Function car(...){...}

    • D. 

      Function car{...}(...)

  • 10. 
    Would you use a function for basic tasks?
    • A. 

      Yes

    • B. 

      No

  • 11. 
    How do you include the "test.php" file from the "scripts" folder
    • A. 

      Include("scripts/test.php");

    • B. 

      #include("scripts/test.php");

    • C. 

      Include;

    • D. 

      Include("scripts/test.php")

  • 12. 
    What is another name for a long list of if statments
  • 13. 
    What is a proper variable example?
    • A. 

      %Variable

    • B. 

      #Variable

    • C. 

      &Variable

    • D. 

      $Variable

  • 14. 
    Which are example of counters (Pick 3)?
    • A. 

      $var += 1

    • B. 

      $var++

    • C. 

      $var=+1

    • D. 

      $var = $var + 1

  • 15. 
    Where can you find more information on PHP (pick 3)
    • A. 

      Google

    • B. 

      Contacting Me

    • C. 

      Facebook

    • D. 

      PHP.net