Register|Login

Have a question? Click here to ask the community.

Tutorial 6 – Strings

| In: 6. Strings | 13,110 views

Video Tutorial


Video Source Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
// File Description: PHP - Strings Tutorial
$aVariable = "The PHP Basics <br>";
echo "The PHP Basics <br>";
echo $aVariable;
 
// Single Quotes
$aVariable2 = 'The PHP Basics Single Quotes Ex. <br>';
echo 'The PHP Basics Single Quotes Ex. <br>';
echo $aVariable2;
 
// Special Characters
$return = "A carriage return is \r";
$tab = "A tab is \t";
$dollar = "A dollar sign is \$";
 
echo 'This is Robert\'s xbox 360';
 
// Heredoc
$aHereDoc = <<<EXAMPLE
<br>ThePHPBasics.com
has PHP tutorials
for free!
EXAMPLE;
 
echo $aHereDoc;
 
?>

Comment Form

You must be logged in to post a comment.