Skip to main content

PHP Strings

Hello guys, Welcome to our next tutorial, Today we are going to learn how to create a php string.

<?php
$variable = “name”;
$literally = ‘My $variable will not print!\\n’;
print($literally);
$literally = “My $variable will print!\\n”;
print($literally);
?>

This will produce following result:

My name will not print!
My name will print

Comments