Skip to main content

PHP 5 For Dummies

PHP 5 For Dummies

Janet Valade

ISBN: 978-0-764-55662-3

May 2004

416 pages

$22.99

Description

Covers the latest major release of PHP, the most popular open source Web scripting language, in the friendly, easy-to-understand For Dummies style
  • PHP is installed on nearly nine million servers, and usage has grown at the rate of 6.5 percent per month for the past two years
  • PHP is easy to learn, well suited for Web development, and can be embedded with HTML, making it a good choice for creating dynamic Web pages for e-commerce sites and other Web applications; a database-friendly language, it connects easily to Sybase, MySQL, mSQL, Oracle, and other databases
  • Explains how to acquire and install PHP, how PHP's features make it a useful scripting language, and how to use PHP for three of the most common applications: interactive Web sites, database storage, and common operating system tasks
Introduction.

Part I: Say Hello to the PHP Scripting Language.

Chapter 1: Getting to Know PHP.

Chapter 2: Setting Up the Environment.

Chapter 3: Creating Your First PHP Script.

Part II: Variables and Data.

Chapter 4: Using Variables in PHP Scripts.

Chapter 5: Working with Data.

Chapter 6: Storing Data in Groups by Using Arrays.

Part III: Basic PHP Programming.

Chapter 7: Controlling the Flow of the Script.

Chapter 8: Reusing PHP Code.

Chapter 9: Object-Oriented Programming Meets PHP.

Part IV: Common PHP Applications.

Chapter 10: The Basics of Web Applications.

Chapter 11: Other Web Applications.

Chapter 12: Storing Data with PHP.

Chapter 13: PHP and Your Operating System.

Chapter 14: PHP Extensions.

Part V: The Part of Tens.

Chapter 15: Ten Things to Look For When Troubleshooting a Script.

Chapter 16: Ten PHP Resources You Can’t Live Without.

Part VI: Appendixes.

Appendix A: Installing PHP.

Appendix B: Useful PHP Built-in Functions.

Index.

ChapterPageDetailsDatePrint Run
343Code Error
echo _<p>Hello World!</p>_
should be
echo “<p>Hello World!</p>”

345Code Error
echo _<p>Hello World!</p>_
should be
echo “<p>Hello World!</p>”

346Code Error
echo _<p>Hello\n World!</p>_
should be
echo “<p>Hello\n World!</p>”

346Code Error
echo _<p>Hello<br> World!</p>_
should be
echo “<p>Hello<br> World!</p>”

581Code Error
$string = _Hello World!_;
$string = _Hello World!_;
should be
$string = “Hello World!”;
$string = ‘Hello World!’;

583Code Error
$name = "Sam";
$output1 = _$name_;
$output2 = _$name_;
echo $output1;
echo $output2;
should be
$name = "Sam";
$output1 = "$name";
$output2 = '$name';
echo $output1;
echo $output2;

584Code Error
$string = _Where is Sally_s house_;
echo $string;
should be
$string = ‘Where is Sally’s house’;
echo $string;

584Code Error
$string = _Where is Sally\_s house_;
should be
$string = ‘Where is Sally\’s house’;

585Code Error
$string1 = _Hello_;
$string2 = _World!_;
$stringall = $string1.$string2;
echo $stringall;
should be
$string1 = 'Hello';
$string2 = 'World!';
$stringall = $string1.$string2;
echo $stringall;

585Code Error
$stringall = $string1._ _.$string2;
should be
$stringall = $string1." ".$string2;