O'Reilly logo

PHP and MySQL by Example by Marko Gargenta, Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6Strings

image

6.1 What Is a String?

Because PHP is a hypertext preprocessor, and most textual data is represented as strings, strings are an essential part of the language and probably more used than any other data type. For example, data read in from a file, database, e-mail, or Web page is represented as string data.

By definition, a PHP string is a piece of text, a series of characters (called bytes) enclosed in quotes. Because PHP puts no boundaries on the length of a string, it can consist of one character, a word, or an entire novel. See Example 6.1.

In Chapter 4, “The Building Blocks,” we discussed strings as a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required