Chapter 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 ...
Get PHP for the World Wide Web, Second Edition: Visual Quickstart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.