$q=1; unset($qitems); $qitems[$q]->ques='PHP is processed on the __________.'; $qitems[$q++]->answer='server'; $qitems[$q]->ques='Javascript is processed on the __________.'; $qitems[$q++]->answer='client'; $qitems[$q]->ques='Web pages that use PHP must have the extension __________.'; $qitems[$q++]->answer='.php'; $qitems[$q]->ques='Web pages are uploaded to the server using __________.'; $qitems[$q++]->answer='FTP'; $qitems[$q]->ques='Why is notepad better than Word for creating PHP pages?.'; $qitems[$q++]->answer='Word has markups that conflict with the PHP code.'; $qitems[$q]->ques='MySQL is a __________.'; $qitems[$q++]->answer='database'; $qitems[$q]->ques='A __________ comes at the end of each PHP statement.'; $qitems[$q++]->answer='semi-colon ; '; $qitems[$q]->ques='The __________ function is used to display text.'; $qitems[$q++]->answer='echo'; $qitems[$q]->ques='The closing for <?php is __________.'; $qitems[$q++]->answer='?>'; $qitems[$q]->ques='Finding and fixing errors in a program is called __________.'; $qitems[$q++]->answer='debugging'; $qitems[$q]->ques='Case sensitivity means that "a" is not the same as "__________".'; $qitems[$q++]->answer='A'; $noNumbers=false; include($_SERVER['DOCUMENT_ROOT'].'/Hello/include/underline-ques-answer.php'); ?>

Debugging

Find the error in each PHP statement: 1. echo "hello'; " does not match '
2. echo Goodbye; Goodbye must be enclosed in quotes.
3. echo "Hello" There must be a semicolon -; at the end.
4. Echo "Hello"; It must be echo, not Echo.
5. < ?php No spaces! It should be <?php
6. echo 'Joe's not here.'; You must escape the quote: Joe\'s
7. What is another way to write the statement above? echo "Joe's not here.";

INDEX, What do you Need?, Hello World: the first example, Syntax, Debugging, Self-Study Questions
Next lesson: Variables in PHPMAIN INDEX
EXAMPLES INDEX

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

Self-Study Questions