Strings and Patterns: Quoting
In the PHP5 Zend Certification has a section under Strings and Patterns called Quoting. The Zend Study Guide does not contain the word Quoting neither does php manual.
Is it referring to Quotation mark, Grave accent and Apostrophe. What do you guys think?
Single Quotes (single quotation mark) are used with simple strings where all characters are used literally.
echo 'simple string'; echo 'not so simple '.$variable;
Double Quotes escalate complex strings for use with complex characters (such as control characters \x2a) and embedding variables within a string.
Including the use of braces {$variable} within double quotes:
$variable = "variable"; echo "simple string useing double quotes <br>"; echo "double quote useing $variable <br>"; echo "double quote useing multiple {$variable}s <br>"; echo "double quote with \" double quotes \" within it <br>"; echo "double quote with control characters \x2a <br>";
No Comments »
RSS feed for comments on this post. TrackBack URL











