PHP Strings
This tutorial shows how to handle strings in PHP, different output methods, functions and the significance of using each of them. A string can be literally expressed in the following ways in PHP 1. Single Quoted 2. Double Quoted 3. HEREDOC 4. NOWDOC (from ver. PHP 5.3.0) Different methods used to handle strings are: 1. Print 2. Echo 3. Sprintf 4. Print_r 5. Var_dump Single Quoted String: The simplest way to specify a string is to enclose it in single quotes (the character ‘). To specify a single quote in your string you will need to escape it with a…