Mastering PHP 4.1 by Jeremy Allen and Charles Hornberger ISBN: 0782129242 With this latest version of PHP you can quickly construct web apps, connect them to databases with ease, and more Back Cover Table of Contents Mastering PHP 4.1 Introduction Part I The Basics of PHP Chapter - Beginning Your Exploration of PHP Chapter - Variables Chapter - Operators and Expressions Chapter - Flow Control and Functions Chapter - Strings and Arrays Part II Programming Principles and PHP Chapter - Object-Oriented Programming Chapter - Debugging and Errors Part III Letting the Data Flow Chapter - SQL and Database Interaction Chapter - Forms and User Interaction Chapter 10 - Data Validation Chapter 11 - Sessions Chapter 12 - Security Chapter 13 - Files and Networking Part IV How PHP Is Connected Chapter 14 - Web Application Development Chapter 15 - XML and XHTML Chapter 16 - LDAP Part V Using PHP in the Real World Chapter 17 - PDF Chapter 18 - Generating Graphics Chapter 19 - E-Mail Part VI Appendixes Appendix A - A Crash Course on Installing PHP Appendix B - PHP Configuration Options Appendix C - XHTML Entities Index List of Figures List of Tables List of Listings List of Sidebars Mastering PHP 4.1 Jeremy Allen Charles Hornberger Associate Publisher: Richard Mills Acquisitions and Developmental Editor: Diane Lowery Editors: Pete Gaughan, Brianne Agatep Production Editor: Liz Burke Technical Editor: Mark W Godfrey Book Designer: Maureen Forys, Happenstance Type-O-Rama Graphic Illustrator: Tony Jonick Electronic Publishing Specialist: Jill Niles Proofreaders: Emily Hsuan, Dave Nash, Laurie O'Connell, Nanette Duffy, Nancy Riddiough Indexer: Ted Laux CD Coordinator: Dan Mummert CD Technician: Kevin Ly Cover Designer: Design Site Cover Illustrator/Photographer: Sergie Loobkoff Copyright © 2002 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501 World rights reserved The authors created reusable code in this publication expressly for reuse by readers Sybex grants readers limited permission to reuse the code found in this publication or its accompanying CD-ROM so long as the authors are attributed in any application containing the reusabe code and the code itself is never distributed, posted online by electronic transmission, sold, or commercially exploited as a stand-alone product Aside from this specific exception concerning reusable code, no part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic, or other record, without the prior agreement and written permission of the publisher Library of Congress Card Number: 2001099190 ISBN: 0-7821-2924-2 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc in the United States and/or other countries Mastering is a trademark of SYBEX Inc Screen reproductions produced with FullShot 99 FullShot 99 © 1991–1999 Inbit Incorporated All rights reserved FullShot is a trademark of Inbit Incorporated The CD interface was created using Macromedia Director, COPYRIGHT 1994, 1997–1999 Macromedia Inc For more information on Macromedia and Macromedia Director, visit http://www.macromedia.com TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer The authors and publisher have made their best efforts to prepare this book, and the content is based upon final release software whenever possible Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s) The authors and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book Manufactured in the United States of America 10 Software License Agreement: Terms and Conditions The media and/or any online materials accompanying this book that are available now or in the future contain programs and/or text files (the "Software") to be used in connection with the book SYBEX hereby grants to you a license to use the Software, subject to the terms that follow Your purchase, acceptance, or use of the Software will constitute your acceptance of such terms The Software compilation is the property of SYBEX unless otherwise indicated and is protected by copyright to SYBEX or other copyright owner(s) as indicated in the media files (the "Owner(s)") You are hereby granted a single-user license to use the Software for your personal, noncommercial use only You may not reproduce, sell, distribute, publish, circulate, or commercially exploit the Software, or any portion thereof, without the written consent of SYBEX and the specific copyright owner(s) of any component software included on this media In the event that the Software or components include specific license requirements or end-user agreements, statements of condition, disclaimers, limitations or warranties ("End-User License"), those End-User Licenses supersede the terms and conditions herein as to that particular Software component Your purchase, acceptance, or use of the Software will constitute your acceptance of such End-User Licenses By purchase, use or acceptance of the Software you further agree to comply with all export laws and regulations of the United States as such laws and regulations may exist from time to time Reusable Code in This Book The authors created reusable code in this publication expressly for reuse for readers Sybex grants readers permission to reuse for any purpose the code found in this publication or its accompanying CD-ROM so long as all of the authors are attributed in any application containing the reusable code, and the code itself is never sold or commercially exploited as a stand-alone product Software Support Components of the supplemental Software and any offers associated with them may be supported by the specific Owner(s) of that material, but they are not supported by SYBEX Information regarding any available support may be obtained from the Owner(s) using the information provided in the appropriate read.me files or listed elsewhere on the media Should the manufacturer(s) or other Owner(s) cease to offer support or decline to honor any offer, SYBEX bears no responsibility This notice concerning support for the Software is provided for your information only SYBEX is not the agent or principal of the Owner(s), and SYBEX is in no way responsible for providing any support for the Software, nor is it liable or responsible for any support provided, or not provided, by the Owner(s) Warranty SYBEX warrants the enclosed media to be free of physical defects for a period of ninety (90) days after purchase The Software is not available from SYBEX in any other form or media than that enclosed herein or posted to www.sybex.com If you discover a defect in the media during this warranty period, you may obtain a replacement of identical format at no charge by sending the defective media, postage prepaid, with proof of purchase to: SYBEX Inc Product Support Department 1151 Marina Village Parkway Alameda, CA 94501 Web: http://www.sybex.com After the 90-day period, you can obtain replacement media of identical format by sending us the defective disk, proof of purchase, and a check or money order for $10, payable to SYBEX Disclaimer SYBEX makes no warranty or representation, either expressed or implied, with respect to the Software or its contents, quality, performance, merchantability, or fitness for a particular purpose In no event will SYBEX, its distributors, or dealers be liable to you or any other party for direct, indirect, special, incidental, consequential, or other damages arising out of the use of or inability to use the Software or its contents even if advised of the possibility of such damage In the event that the Software includes an online update feature, SYBEX further disclaims any obligation to provide this feature for any specific duration other than the initial posting The exclusion of implied warranties is not permitted by some states Therefore, the above exclusion may not apply to you This warranty provides you with specific legal rights; there may be other rights that you may have that vary from state to state The pricing of the book with the Software by SYBEX reflects the allocation of risk and limitations on liability contained in this agreement of Terms and Conditions Shareware Distribution This Software may contain various programs that are distributed as shareware Copyright laws apply to both shareware and ordinary commercial software, and the copyright Owner(s) retains all rights If you try a shareware program and continue using it, you are expected to register it Individual programs differ on details of trial periods, registration, and payment Please observe the requirements stated in appropriate files Copy Protection The Software in whole or in part may or may not be copy-protected or encrypted However, in all cases, reselling or redistributing these files without authorization is expressly forbidden except as specifically provided for by the Owner(s) therein To Erin: your patience and caring make anything possible —Jeremy Allen To Charles Semmelman —Charles Hornberger Acknowledgments Everything started with my parents, so they get the first thanks for bringing me into this world! Thank you Erin, for giving up so much of our time together, and for being so patient and understanding Thanks to the entire team involved with this project! Although not directly involved with Mastering PHP 4.1, thanks to Tom Cirtin for giving me the opportunity with my first professional writing project Next comes Diane Lowery, who had to work with an author who had his own ideas about how schedules worked—thank you, Diane Charlie Hornberger deserves much credit here for the tremendous amount of work he did with this book Thanks to Pete Gaughan for his tireless editing efforts and insight Thanks to Liz Burke for keeping everything, and everyone, straight! Thanks to our technical editor, Mark Godfrey, for keeping it all technically coherent The team at Sybex has been awesome, and fundamental to this book Thanks to the development team at elliptIQ for being so supportive of me writing this book —Jeremy Allen I'd like to thank many people for their help putting this book together, especially: my coauthor, Jeremy Allen; Liz Burke, for keeping everything running smoothly even when I wasn't; editor Pete Gaughan, for painstaking and thoughtful application of the knife; and Diane Lowery, for bringing me on board in the first place —Charles Hornberger Part I: The Basics of PHP Chapter List Chapter 1: Beginning Your Exploration of PHP Chapter 2: Variables Chapter 3: Operators and Expressions Chapter 4: Flow Control and Functions Chapter 5: Strings and Arrays Chapter 1: Beginning Your Exploration of PHP Overview Developing applications and sites for the World Wide Web, or for Web-like uses such as intranets, has become one of the most extensive areas of computing and programming work If it can be done digitally, then somebody, somewhere, is trying to adapt it to a web browser Understanding the various flavors of web activity—static and dynamic pages, client-side and server-side systems—is a necessary step toward increasing your flexibility as a developer PHP builds upon the familiar structure of programming languages such as C, Java, and Perl It helps create dynamic HTML content by providing the necessary tools to easily manipulate that content PHP is becoming one of the preeminent tools for increasing the power of web pages because it is easy to use yet powerful Building a few elementary scripts, testing the two main methods of moving data back and forth, and learning to comment PHP code will demonstrate just how accessible PHP's features are Developing for the Web The term web development paints a wide, long stroke It is a general term to categorize a large variety of activities Web development can mean anything from putting a static HTML page on a small World Wide Web site to developing a massive, continent-spanning, corporate intranet that handles mission-critical business communications But these activities break down into several manageable categories Web Applications To get into the topic of developing web applications, first we must tackle the term application: What is an application? What should an application do? An application is any software developed to simplify or perform a task The level of the task varies from very specific to more general A program that takes the grades of a student's six classes, averages those grades, and summarizes them in a report is a simple, but limited, application On the other hand, an application that provides the means to communicate with others, such as an online groupware app (one that allows users to coordinate their workflow), is more complex and achieves a more general goal Although the scope of the groupware application is much wider than the scope of the grade-averaging program, both are still applications Then, what specifically are web applications? A web application, in general, is an application that leverages the ubiquity and ease of communication the Internet provides A more restricted definition of web application—the one that will be used throughout the book—is an application that uses a web browser as the client There are many client-side technologies available to most web browsers In general, the most far-reaching and easily accessed web applications are those that use simple and elegant Hypertext Markup Language (HTML) A few examples that strictly fit the term web application are web-based banking systems, auctions, and news sites Static and Dynamic Websites Static sites have content that does not change until the author updates it, and these sites work well for many people because they allow information to be shared However, static sites provide no interaction with visitors and not accomplish any tasks in a programmable way Dynamic sites allow user interaction Although, like a static site, a dynamic one uses HTML for the client interface, it also allows users to take individual and customizable actions, such as reserving and purchasing a particular airline flight or even seat The purpose behind an online ticketing system is straightforward: an easily usable interface that provides convenience to the user With such a system globally available to a web terminal, the task of buying a ticket is decentralized and easy to accomplish HTML is a text-based markup language Ideally, HTML is used to define the content and sketch its structure, and cascading style sheets (CSS) are used to position and style the content Of course, due to backward compatibility and the wide range of clients used, CSS may be a less-than-optimal choice for positioning content And beyond that, because of the static nature of HTML (meaning it is just a simple, text-based language), it is itself limited when we want to make our content change and evolve HTML provides an excellent means of sharing content with a variety of web-based clients, but it has several drawbacks When an HTML document is requested from a web server, the web server returns the document to the requester—nothing more This is just a way to publish content, not create, control, organize, or customize it HTML as it is used today tends to focus on the content's visual quality, not its detailed structure Server-Side vs Client-Side HTML is a client-side technology, meaning that an HTML document is processed entirely by the client A web server doesn't behave differently based on the code contained within an HTML document A web server merely provides requested files; the client browser makes the decisions about rendering them HTML is not a programming language; it does not provide any constructs for data processing of any kind PHP, conversely, is entirely server-side When a PHP script executes, it doesn't interact directly with the browser; only the final product of the PHP script, which usually is an HTML document, is dealt with by the requesting browser If a browser were sent an unprocessed PHP script, the browser would attempt to render the PHP script as regular HTML Browsers cannot execute PHP scripts HTML is an integral component to web application development PHP code can be embedded and mixed directly into HTML When a client requests an HTML document from a web server, the server responds by directly sending the document to the client Figure 1.1 shows a client requesting a HTML document and illustrates how the server responds Figure 1.1: HTML document request Requesting a PHP script works differently Before the document is sent to the client, the document is processed by PHP, and the PHP engine executes any PHP code found in the document Figure 1.2 illustrates a client request for a PHP script The PHP script in this illustration returns a processed HTML document Figure 1.2: PHP script request Table C.1: Entities for Standard Characters Character é Entity XHTML Unicode Common Names Name Reference Value and Notes eacute é 00E9 Latin small e with acute accent ê ecirc ê 00EA Latin small e with circumflex ë euml ë 00EB Latin small e with diaeresis (umlaut) ì igrave ì 00EC Latin small i with grave accent í iacute í 00ED Latin small i with acute accent ỵ icirc î 00EE Latin small i with circumflex ï iuml ï 00EF Latin small i with diaeresis (umlaut) ð eth ð 00F0 Latin small eth ñ ntilde ñ 00F1 Latin small n with tilde ò ograve ò 00F2 Latin small o with grave accent ó oacute ó 00F3 Latin small o with acute accent ô ocirc ô 00F4 Latin small o with circumflex õ otilde õ 00F5 Latin small o with tilde ö ouml ö 00F6 Latin small o with diaeresis (umlaut) ÷ divide ÷ 00F7 Division sign ø oslash ø 00F8 Latin small o with stroke or slash ù ugrave ù 00F9 Latin small u with grave accent ú uacute ú 00FA Latin small u with Table C.1: Entities for Standard Characters Character Entity XHTML Unicode Common Names Name Reference Value and Notes acute accent ucirc û û 00FB Latin small u with circumflex uuml ü ü 00FC Latin small u with diaeresis (umlaut) yacute ý ý 00FD Latin small y with acute accent ỵ thorn þ 00FE Latin small thorn ÿ yuml ÿ 00FF Latin small y with diaeresis (umlaut) Special Characters Table C.2 lists the XHTML entities for the most common special characters, such as the Latin Extended-A set, and general punctuation The entity declaration for this list can be found at the following URL: http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent If you are writing your own DTD and wish to include these entities in your documents without actually copying and pasting the contents of the URL, you can simply add the following two lines to your DTD: %HTMLspecial; Table C.2: Entities for Special Characters Character Entity XHTML Unicode Common Name Reference Value Names and Notes C0 Controls and Basic Latin " quot " 0022 Quotation mark; straight double quote & amp & 0026 Ampersand < lt < 003C Less-than sign Table C.2: Entities for Special Characters Character Entity XHTML Unicode Common Name Reference Value Names and Notes C0 Controls and Basic Latin > gt > 003E Greater-than sign ' apos ' 0027 Apostrophe mark Latin Extended-A Œ OElig Œ 0152 Latin capital OE œ oelig œ 0153 Latin small oe Š Scaron Š 0160 Latin capital S with caron š scaron š 0161 Latin small s with caron Ÿ Yuml Ÿ 0178 Latin capital Y with diaeresis (umlaut) Spacing Modifier Letters ˆ circ ˆ 02C6 Modifier letter circumflex accent ˜ tilde ˜ 02DC Small tilde ensp 2002 En space emsp 2003 Em space thinsp 2009 Thin space zwnj 200C Zero-width General Punctuation | nonjoiner zwj 200D Zero-width joiner lrm 200E Left-to-right Table C.2: Entities for Special Characters Character Entity XHTML Unicode Common Name Reference Value Names and Notes C0 Controls and Basic Latin mark rlm 200F Right-to-left mark – ndash – 2013 En dash — mdash — 2014 Em dash ' lsquo ‘ 2018 Left single quotation mark ' rsquo ’ 2019 Right single quotation mark ‚ sbquo ‚ 201A Single low-9 quotation mark " ldquo “ 201C Left double quotation mark " rdquo ” 201D Right double quotation mark „ bdquo „ 201E Double low-9 quotation mark † dagger † 2020 Dagger ‡ Dagger ‡ 2021 Double dagger ‰ permil ‰ 2030 Per-mille sign ‹ lsaquo ‹ 2039 Single left-pointing angle quotation mark › rsaquo › 203A Single right-pointing angle quotation mark € euro € 20AC Euro sign Symbols Table C.3 lists the XHTML entities for many mathematical, Greek, and symbolic characters, even including arrows and playing-card suits The entity declaration for this list can be found at the following URL: http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent If you are writing your own DTD and wish to include these entities in your documents without actually copying and pasting the contents of the URL, you can simply add the following two lines to your DTD: %HTMLsymbol; Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B ƒ fnof ƒ 0192 Latin small f with hook; function Greek A Alpha Α 0391 Greek capital alpha B Beta Β 0392 Greek capital beta Γ Gamma Γ 0393 Greek capital gamma ∆ Delta Δ 0394 Greek capital delta E Epsilon Ε 0395 Greek capital epsilon Z Zeta Ζ 0396 Greek capital zeta H Eta Η 0397 Greek capital eta Θ Theta Θ 0398 Greek capital theta Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B I Iota Ι 0399 Greek capital iota K Kappa Κ 039A Greek capital kappa Λ Lambda Λ 039B Greek capital lambda M Mu Μ 039C Greek capital mu N Nu Ν 039D Greek capital nu Ξ Xi Ξ 039E Greek capital xi O Omicron Ο 039F Greek capital omicron Π Pi Π 03A0 Greek capital pi P Rho Ρ 03A1 Greek capital rho Σ Sigma Σ 03A3 Greek capital sigma T Tau Τ 03A4 Greek capital tau Y Upsilon Υ 03A5 Greek capital upsilon Greek Φ Phi Φ 03A6 Greek capital phi X Chi Χ 03A7 Greek capital chi ψ Psi Ψ 03A8 Greek capital Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B psi Ω Omega Ω 03A9 Greek capital omega α alpha α 03B1 Greek small alpha β beta β 03B2 Greek small beta γ gamma γ 03B3 Greek small gamma δ delta δ 03B4 Greek small delta ε epsilon ε 03B5 Greek small epsilon ζ zeta ζ 03B6 Greek small zeta η eta η 03B7 Greek small eta θ theta θ 03B8 Greek small theta ι iota ι 03B9 Greek small iota κ kappa κ 03BA Greek small kappa λ lambda λ 03BB Greek small lambda µ mu μ 03BC Greek small mu v nu ν 03BD Greek small nu ξ xi ξ 03BE Greek small xi Ο omicron ο 03BF Greek small Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B omicron π pi π 03C0 Greek small pi ρ rho ρ 03C1 Greek small rho ζ sigmaf ς 03C2 Greek small final sigma σ sigma σ 03C3 Greek small sigma τ tau τ 03C4 Greek small tau υ upsilon υ 03C5 Greek small upsilon φ phi φ 03C6 Greek small phi χ chi χ 03C7 Greek small chi ψ psi ψ 03C8 Greek small psi ω omega ω 03C9 Greek small omega ϑ thetasym ϑ 03D1 Greek small theta symbol γ upsih ϒ 03D2 Greek upsilon with hook symbol ϖ piv ϖ 03D6 Greek pi symbol General Punctuation • bull • 2022 Bullet (small black circle, Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B not the same as the bullet operator that is Unicode 2219) … hellip … 2026 Horizontal ellipsis ' prime ′ 2032 Prime; minutes or feet mark " Prime ″ 2033 Double prime; seconds or inches mark − oline ‾ 203E Overline or spacing overscore / frasl ⁄ 2044 Fraction slash weierp ℘ 2118 Script capital Letter-like Symbols ℘ P; power set ℑ image ℑ 2111 Blackletter capital I; imaginary part ℜ real ℜ 211C Blackletter capital R; real part symbol ™ trade ™ 2122 Trademark sign ℵ alefsym ℵ 2135 Alef symbol; first transfinite cardinal (not the same as Hebrew letter alef, Unicode Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B 05D0, although the same glyph could be used to depict both) Arrows ← larr ← 2190 Leftward arrow Ç uarr ↑ 2191 Upward arrow → rarr → 2192 Rightward arrow ↓ darr ↓ 2193 Downward arrow ↔ harr ↔ 2194 Left–right arrow ↵ crarr ↵ 21B5 Downward arrow with corner leftward; carriage return ⇐ lArr ⇐ 21D0 Leftward double arrow ⇑ uArr ⇑ 21D1 Upward double arrow ⇒ rArr ⇒ 21D2 Rightward double arrow ⇓ dArr ⇓ 21D3 Downward double arrow ⇔ hArr ⇔ 21D4 Left–right double arrow Mathematical Operators Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B ∀ forall ∀ 2200 For all ∂ part ∂ 2202 Partial differential ∃ exist ∃ 2203 There exists ∅ empty ∅ 2205 Empty set or null set; diameter ∇ nabla ∇ 2207 Nabla; backward difference ∈ isin ∈ 2208 Element of ∉ notin ∉ 2209 Not an element of ∋ ni ∋ 220B Contains as member ∏ prod ∏ 220F n-ary product; product sign (not the same character as Greek capital pi, Unicode 03A0, though the same glyph might be used for both) ∑ sum ∑ 2211 n-ary summation; sum sign (not the same character as Greek capital sigma, Unicode 03A3, Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B though the same glyph might be used for both) – minus − 2212 Minus sign ∗ 2217 Asterisk Mathematical Operators ∗ lowast operator √ radic √ 221A Square root or radical sign ∝ prop ∝ 221D Proportional to ∞ infin ∞ 221E Infinity ∠ ang ∠ 2220 Angle ∧ and ∧ 2227 Logical AND; wedge ∨ or ∨ 2228 Logical OR; vee ∩ cap ∩ 2229 Intersection; cap ∪ cup ∪ 222A Union; cup ∫ int ∫ 222B Integral ∴ there4 ∴ 2234 Therefore ∼ sim ∼ 223C Tilde operator; varies with or similar to (not the same character as the tilde, Unicode 007E, although the Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B same glyph might be used to represent both) ≅ cong ≅ 2245 Approximately equal to ("cong"ruent with) ≈ asymp ≈ 2248 Almost equal to; asymptotic to ≡ ne ≠ 2260 Not equal to + equiv ≡ 2261 Identical to ≤ le ≤ 2264 Less-than or equal to ≥ ge ≥ 2265 Greater-than or equal to ⊂ sub ⊂ 2282 Subset of ⊃ sup ⊃ 2283 Superset of ⊄ nsub ⊄ 2284 Not a subset of ⊆ sube ⊆ 2286 Subset of or equal to ⊇ supe ⊇ 2287 Superset of or equal to ⊕ oplus ⊕ 2295 Circled plus; direct sum Mathematical Operators ⊗ otimes ⊗ 2297 Circled times; vector product ⊥ perp ⊥ 22A5 Up tack; Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B orthogonal to or perpendicular • sdot ⋅ 22C5 Dot operator (not the same character as the middle dot, Unicode 00B7) Miscellaneous Technical lceil ⌈ 2308 Left ceiling rceil ⌉ 2309 Right ceiling lfloor ⌊ 230A Left floor rfloor ⌋ 230B Right floor < lang 〈 2329 Left-pointing angle bracket (not the same character as less than, Unicode 003C, or single left-pointing angle quotation mark, Unicode 2039) > rang 〉 232A Right-pointing angle bracket (not the same character as greater than, Unicode 003E, or single right-pointing Table C.3: Entities for Symbols Character Entity XHTML Unicode Common Name Reference Value Names and Notes Latin Extended-B angle quotation mark, Unicode 203A) Geometric Shapes ◊ loz ◊ 25CA Lozenge or long diamond (open) Miscellaneous Symbols ♠ spades ♠ 2660 Spade suit (filled) ♣ clubs ♣ 2663 Club suit; shamrock (filled) ♥ hearts ♥ 2665 Heart suit; valentine (filled) ♦ diams ♦ 2666 Diamond suit (filled) ... 20 010 9 919 0 ISBN: 0-78 21- 29 24- 2 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc in the United States and/or other countries Mastering is a trademark of SYBEX. .. you_are .php Create a PHP script named you_are .php and enter Listing 1 .4 into the script Listing 1 .4: Basic Action Page (you_are .php) You Are! < ?php print('Well,... Copyright © 2002 SYBEX Inc., 11 51 Marina Village Parkway, Alameda, CA 945 01 World rights reserved The authors created reusable code in this publication expressly for reuse by readers Sybex grants