2 Variables

In the last chapter, you used PHP to send simple text and HTML code to a Web browser—in other words, something for which you don’t need PHP at all! Don’t worry, though; this book will teach you how to use the print() function in conjunction with other PHP features to do useful things with your Web site.

To make the leap from creating simple, static pages to dynamic Web applications and interactive Web sites, you need to use variables. Variables are an essential concept in PHP, as well as in any other programming language. Understanding what variables are, the types that a language supports, and how to use them is critical to your work.

This chapter will discuss the fundamentals of variables used in PHP, and later chapters will cover ...

Get PHP for the Web: Visual QuickStart Guide, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.