Page 103 - Open Soource Technologies 304.indd
P. 103
Deepak Mehta, Lovely Professional University Unit 5: Strings
Unit 5: Strings Notes
CONTENTS
Objectives
Introduction
5.1 Quoting String Constants
5.1.1 Variable Interpolation
5.1.2 Single-Quoted Strings
5.1.3 Double-Quoted Strings
5.2 Printing Strings
5.2.1 echo
5.2.2 print ( )
5.2.3 printf( )
5.2.4 print_r( ) and var_dump( )
5.3 Accessing Individual Characters
5.4 Cleaning Strings
5.4.1 Removing Whitespace
5.4.2 Changing Case
5.5 Encoding and Escaping
5.5.1 HTML
5.5.2 URLs
5.5.3 SQL
5.5.4 C-String Encoding
5.6 Comparing Strings
5.6.1 Exact Comparisons
5.6.2 Approximate Equality
5.7 Manipulating and Searching Strings
5.7.1 Substrings
5.7.2 Miscellaneous String Functions
5.7.3 Decomposing a String
5.7.4 String-Searching Functions
5.8 Regular Expressions
5.8.1 Regular Expression Syntax
5.8.2 Regular Expression Functions
5.9 Summary
5.10 Keywords
5.11 Review Questions
5.12 Further Reading
LOVELY PROFESSIONAL UNIVERSITY 97