Php Strings

[codesyntax lang=”php” container=”div”]

<?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;
 
?>

[/codesyntax].

Lasă un răspuns

Adresa ta de email nu va fi publicată. Câmpurile obligatorii sunt marcate cu *