Php Programming Language

Páginas: 161 (40189 palabras) Publicado: 14 de octubre de 2011
PHP Cookbook
By David Sklar, Adam Trachtenberg

Publisher Pub Date ISBN Pages

: O'Reilly : November 2002 : 1-56592-681-1 : 632

The PHP Cookbook is a collection of problems, solutions, and practical examples for PHP programmers. The book contains a unique and extensive collection of best practices for everyday PHP programming dilemmas. It contains over 250 recipes, ranging from simpletasks to entire programs that demonstrate complex tasks, such as printing HTML tables and generating bar charts -- a treasure trove of useful code for PHP programmers, from novices to advanced practitioners.

Copyright Preface Who This Book Is For What Is in This Book Other Resources Conventions Used in This Book Comments and Questions Acknowledgments

Chapter 1. Strings Section 1.1.Introduction Recipe 1.2. Accessing Substrings Recipe 1.3. Replacing Substrings Recipe 1.4. Processing a String One Character at a Time Recipe 1.5. Reversing a String by Word or Character Recipe 1.6. Expanding and Compressing Tabs Recipe 1.7. Controlling Case Recipe 1.8. Interpolating Functions and Expressions Within Strings Recipe 1.9. Trimming Blanks from a String Recipe 1.10. Parsing Comma-Separated DataRecipe 1.11. Parsing Fixed-Width Delimited Data Recipe 1.12. Taking Strings Apart Recipe 1.13. Wrapping Text at a Certain Line Length Recipe 1.14. Storing Binary Data in Strings

Chapter 2. Numbers Section 2.1. Introduction Recipe 2.2. Checking Whether a String Contains a Valid Number Recipe 2.3. Comparing Floating-Point Numbers Recipe 2.4. Rounding Floating-Point Numbers Recipe 2.5. Operating ona Series of Integers Recipe 2.6. Generating Random Numbers Within a Range Recipe 2.7. Generating Biased Random Numbers Recipe 2.8. Taking Logarithms Recipe 2.9. Calculating Exponents Recipe 2.10. Formatting Numbers Recipe 2.11. Printing Correct Plurals Recipe 2.12. Calculating Trigonometric Functions Recipe 2.13. Doing Trigonometry in Degrees, not Radians Recipe 2.14. Handling Very Large or VerySmall Numbers Recipe 2.15. Converting Between Bases Recipe 2.16. Calculating Using Numbers in Bases Other Than Decimal

Chapter 3. Dates and Times Section 3.1. Introduction Recipe 3.2. Finding the Current Date and Time Recipe 3.3. Converting Time and Date Parts to an Epoch Timestamp Recipe 3.4. Converting an Epoch Timestamp to Time and Date Parts Recipe 3.5. Printing a Date or Time in aSpecified Format Recipe 3.6. Finding the Difference of Two Dates Recipe 3.7. Finding the Difference of Two Dates with Julian Days Recipe 3.8. Finding the Day in a Week, Month, Year, or the Week Number in a Year Recipe 3.9. Validating a Date Recipe 3.10. Parsing Dates and Times from Strings Recipe 3.11. Adding to or Subtracting from a Date Recipe 3.12. Calculating Time with Time Zones Recipe 3.13.Accounting for Daylight Saving Time Recipe 3.14. Generating a High-Precision Time Recipe 3.15. Generating Time Ranges Recipe 3.16. Using Non-Gregorian Calendars Recipe 3.17. Program: Calendar

Chapter 4. Arrays Section 4.1. Introduction Recipe 4.2. Specifying an Array Not Beginning at Element 0 Recipe 4.3. Storing Multiple Elements per Key in an Array Recipe 4.4. Initializing an Array to a Range ofIntegers Recipe 4.5. Iterating Through an Array Recipe 4.6. Deleting Elements from an Array Recipe 4.7. Changing Array Size Recipe 4.8. Appending One Array to Another Recipe 4.9. Turning an Array into a String Recipe 4.10. Printing an Array with Commas Recipe 4.11. Checking if a Key Is in an Array Recipe 4.12. Checking if an Element Is in an Array Recipe 4.13. Finding the Position of an Element in anArray Recipe 4.14. Finding Elements That Pass a Certain Test Recipe 4.15. Finding the Largest or Smallest Valued Element in an Array Recipe 4.16. Reversing an Array Recipe 4.17. Sorting an Array Recipe 4.18. Sorting an Array by a Computable Field Recipe 4.19. Sorting Multiple Arrays Recipe 4.20. Sorting an Array Using a Method Instead of a Function Recipe 4.21. Randomizing an Array Recipe 4.22....
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Awk language programming
  • Java Language Programming
  • Language
  • Language
  • Language
  • Language
  • Language
  • language

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS