PHP Cookbook - David F. Sklar, Adam Trachtenberg

PHP Cookbook

Buch | Softcover
610 Seiten
2002
O'Reilly Media (Verlag)
978-1-56592-681-3 (ISBN)
31,95 inkl. MwSt
zur Neuauflage
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
Programmers and Web designers will learn how to build dynamic web applications that work on any web browser and on any web server that supports CGI scripts - interactive programs that aren't tied to particular systems.
PHP is a simple yet powerful open source scripting language that has become a big player in Web development. Over a million Web sites, from large corporate sites to small personal sites, are using PHP to serve dynamic Web content. PHP's broad feature set, approachable syntax, and support for different operating systems and Web servers make it an ideal language for rapid Web development. This is a collection of problems, solutions, and practical examples for PHP programmers. The book contains a collection of best practices for everyday PHP programming dilemmas. For every problem addressed in the book, there's a worked-out solution or "recipe" - short, focused pieces of code that you can insert directly into your applications. Also included are explanations of how and why the code works, so you can learn to adapt the problem-solving techniques to similar situations. The recipes in the cookbook range from simple tasks, such as sending a data base query and fetching URLs, to entire programs that demonstrate complex tasks, such as printing HTML tables and generating bar charts.
This book contains over 250 recipes on the following topics: working with basic data types, including strings, numbers, dates and times, and arrays; PHP building blocks, such as variables, functions, classes, and objects; Web programming, including forms, database access, and XML; useful features like regular expressions, encryption and security, graphics, internationalization and localization, and Internet services; working with files and directories; command-line PHP and PHP-GTK; and PEAR, the PHP Extension and Application Repository.

David Sklar is an independent consultant in New York City. He was co-founder and Chief Technology Officer of two companies: Student.Com and TVGrid.Com. Mr. Sklar holds a BS in Computer Science from Yale University. Adam Trachtenberg lives in New York City and is currently working on his MBA from Columbia Business School. Before returning to school, he co-founded two companies: Student.Com and TVGrid.Com, where he served both as Vice President for Development. Mr. Trachtenberg also has a BA in Mathematics from Columbia University.

Table of contents: Preface 1. Strings 1.1 Accessing Substrings 1.2 Replacing Substrings 1.3 Processing a String One Character at a Time 1.4 Reversing a String by Word or Character 1.5 Expanding and Compressing Tabs 1.6 Controlling Case 1.7 Interpolating Functions and Expressions Within Strings 1.8 Trimming Blanks from a String 1.9 Parsing Comma-Separated Data 1.10 Parsing Fixed-Width Delimited Data 1.11 Taking Strings Apart 1.12 Wrapping Text at a Certain Line Length 1.13 Storing Binary Data in Strings 2. Numbers 2.1 Checking Whether a String Contains a Valid Number 2.2 Comparing Floating-Point Numbers 2.3 Rounding Floating-Point Numbers 2.4 Operating on a Series of Integers 2.5 Generating Random Numbers Within a Range 2.6 Generating Biased Random Numbers 2.7 Taking Logarithms 2.8 Calculating Exponents 2.9 Formatting Numbers 2.10 Printing Correct Plurals 2.11 Calculating Trigonometric Functions 2.12 Doing Trigonometry in Degrees, not Radians 2.13 Handling Very Large or Very Small Numbers 2.14 Converting Between Bases 2.15 Calculating Using Numbers in Bases Other Than Decimal 3. Dates and Times 3.1 Finding the Current Date and Time 3.2 Converting Time and Date Parts to an Epoch Timestamp 3.3 Converting an Epoch Timestamp to Time and Date Parts 3.4 Printing a Date or Time in a Specified Format 3.5 Finding the Difference of Two Dates 3.6 Finding the Difference of Two Dates with Julian Days 3.7 Finding the Day in a Week, Month, Year, or the Week Number in a Year 3.8 Validating a Date 3.9 Parsing Dates and Times from Strings 3.10 Adding to or Subtracting from a Date 3.11 Calculating Time with Time Zones 3.12 Accounting for Daylight Saving Time 3.13 Generating a High-Precision Time 3.14 Generating Time Ranges 3.15 Using Non-Gregorian Calendars 3.16 Program: Calendar 4. Arrays 4.1 Specifying an Array Not Beginning at Element 0 4.2 Storing Multiple Elements per Key in an Array 4.3 Initializing an Array to a Range of Integers 4.4 Iterating Through an Array 4.5 Deleting Elements from an Array 4.6 Changing Array Size 4.7 Appending One Array to Another 4.8 Turning an Array into a String 4.9 Printing an Array with Commas 4.10 Checking if a Key Is in an Array 4.11 Checking if an Element Is in an Array 4.12 Finding the Position of an Element in an Array 4.13 Finding Elements That Pass a Certain Test 4.14 Finding the Largest or Smallest Valued Element in an Array 4.15 Reversing an Array 4.16 Sorting an Array 4.17 Sorting an Array by a Computable Field 4.18 Sorting Multiple Arrays 4.19 Sorting an Array Using a Method Instead of a Function 4.20 Randomizing an Array 4.21 Shuffling a Deck of Cards 4.22 Removing Duplicate Elements from an Array 4.23 Finding the Union, Intersection, or Difference of Two Arrays 4.24 Finding All Element Combinations of an Array 4.25 Finding All Permutations of an Array 4.26 Program: Printing an Array in a Horizontally Columned HTML Table 5. Variables 5.1 Avoiding == Versus = Confusion 5.2 Establishing a Default Value 5.3 Exchanging Valu

Erscheint lt. Verlag 24.12.2002
Zusatzinfo index
Verlagsort Sebastopol
Sprache englisch
Maße 179 x 233 mm
Gewicht 890 g
Einbandart kartoniert
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Web / Internet PHP
ISBN-10 1-56592-681-1 / 1565926811
ISBN-13 978-1-56592-681-3 / 9781565926813
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
das umfassende Handbuch

von Christian Wenz; Tobias Hauser

Buch | Hardcover (2024)
Rheinwerk (Verlag)
49,90