Bifalgorithm post · Computer science one · Basics
How can you create and reassign strings in PHP?
How can you create and reassign strings in PHP? (Computer science one · Basics) — "We can create strings by assigning a string literal value to a variable. Str…
Ideas in this flowchart
- Creating and reassigning strings in PHP
- A string is created by assigning a string literal to a variable.
- Strings can be written with single or double quotes.
- PHP has no individual character type; a single character is a string.
- The example uses double-quote syntax.
- $firstName = "Thomas";
- $lastName = "Waits";
- A variable containing a string can be reassigned.
- $firstName = "Tom";
- Reassignment effectively destroys the old string value.