Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PHP 5 CMS Framework Development - 2nd Edition

You're reading from   PHP 5 CMS Framework Development - 2nd Edition For professional PHP developers, this is the perfect guide to web-oriented frameworks and content management systems. Covers all the critical design issues and programming techniques in an easy-to-follow style and structure.

Arrow left icon
Product type Paperback
Published in Aug 2010
Publisher Packt
ISBN-13 9781849511346
Length 416 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Martin Brampton Martin Brampton
Author Profile Icon Martin Brampton
Martin Brampton
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

PHP 5 CMS Framework Development
Second Edition
Credits
About the Author
1. Acknowledgement
About the Reviewers
2. Preface
1. CMS Architecture FREE CHAPTER 2. Organizing Code 3. Database and Data Objects 4. Administrators, Users, and Guests 5. Sessions and Users 6. Caches and Handlers 7. Access Control 8. Handling Extensions 9. Menus 10. Languages 11. Presentation Services 12. Other Services 13. SEF and RESTful Services 14. Error Handling 15. Real Content Packaging Extensions
Packaging XML Example

Exploring PHP character sets


PHP as we see it in version 5 does not really know much at all about character sets. As we have seen previously, using UTF-8 means that the things that people see as characters may be one, two or three bytes long in simple cases. They are longer when special characters are accounted for. But when PHP looks at a string using something like the strlen function, the only thing it is looking for is bytes. The length returned by strlen for a single UTF-8 character could be 1, 2, or 3.

On the plus side, PHP will not damage or alter strings. So if we have a string that contains UTF-8 characters, it can be moved around, stored, retrieved, and sent to the browser, all without any adverse events. Provided, that is, we do not attempt to do the kind of processing that is liable to go wrong!

It is possible to subscript the individual bytes of a character string, by writing something like $string[0]. Here it is essential to remember that what we will get is a byte, and not...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image