The first—arguably most important—variable type I’ll go into is strings. A string is merely a quoted chunk of letters, numbers, spaces, punctuation, and so forth. These are all strings:
"In watermelon sugar"
'February 3, 2005'
To make a string variable, assign a string value to a valid variable name:
$first_name = 'Tobias'; $today = 'February 3, 2005';
To print out the value of a string, use either echo() or print():
To print the value of string within a context, use double quotation marks:
echo "Hello, $first_name";
In a way, you’ve already worked with strings once—when using the predefined variables in the preceding section.
Create a new HTML document in your text editor, ...