diff --git a/pages/The-Basics.md b/pages/The-Basics.md index bfa9e5b..e99de47 100644 --- a/pages/The-Basics.md +++ b/pages/The-Basics.md @@ -153,16 +153,18 @@ $a = 'Multi-line example' // concatenation operator (.) ### String types -String types are a constant feature within the PHP community, but hopefully this section will explain the -differences between the string types and their benefits/uses. +Strings are a series of characters, which should sound fairly simple. That said, there are a few different types +of strings and they offer slightly different syntax, with slightly different behaviors. #### Single quotes -Single quotes are the simplest way to define a string and are often the quickest. Their speed stems from PHP not -parsing the string (does not parse for variables). They are best suited for: +Single quotes are used to denote a "literal string". Literal strings do not attempt to parse special characters +or variables. + +If using single quotes, you could enter a variable name into a string like so: `'some $thing'`, and you would +see the exact output of `some $thing`. If using double quotes, that would try to evaluate the `$thing` variable +name and show errors if no variable was found. -- Strings that do not need to be parsed -- Writing of a variable into plain text {% highlight php %}