PHP 5 for Dummies Free Open Book

PHP 5 for Dummies

Previous PageNext Page
Chapter 5
Working with Data
In This Chapter
Understanding data types
Performing arithmetic
Manipulating character strings
Using dates and times
V
ariables can store data of different types, and different types of data can
do different things. For example, you can add variables whose values are
numbers (1 + 2), but adding variables whose values are characters (a + b)
doesn’t make much sense. In this chapter, you find out what data types PHP
can handle and how you can use them.
Understanding Data Types
You can store the following simple types of data in PHP variables:
Integer:A whole number (no fractions), such as –43, 0, 1, 27, or 5438.
The range of integers that is allowed varies, depending on your oper-
ating system, but in general, you can usually use any number from 
–2 billion up to +2 billion.
Floating point number:A number (usually not a whole number) that
includes decimal places, such as 5.24 or 123.456789. This is often called
a real numberor a float.
Character string:A series of single characters, such as 
hello
. There is
no practical limit on the length of a string.
Boolean:A TRUE or FALSE value. See the nearby sidebar for more 
information.
Previous PageNext Page


     Main Menu
PHP 5 for Dummies
Table of Contents
Introduction
Part I: Say Hello to the PHP Scripting Language
Part II: Variables and Data
Documenting the Script - Page 68
Documenting the Script - Page 69
Chapter 4: Using Variables in PHP Scripts
Chapter 5: Working with Data
Working with Numbers
Working with Character Strings
Working with Dates and Times
Chapter 6: Storing Data in Groups by Using Arrays
Part III: Basic PHP Programming
Part IV: Common PHP Applications
Part V: The Part of Tens
Part VI: Appendixes
Index
Team DDU


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes
500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele