Introduction
Escape sequences let you put special characters inside strings that are hard to type directly, like new lines or tabs.
"\n", "\t", "\\", "\"", "\'"
$text = "Hello\nWorld!"; echo $text;
$quote = "She said, \"Hi!\""; echo $quote;
$path = "C:\\Program Files\\"; echo $path;
$tabbed = "Column1\tColumn2"; echo $tabbed;
<?php $text = "Line1\nLine2"; echo $text . "\n"; $quote = "He said, \"Hello!\""; echo $quote . "\n"; $path = "C:\\Windows\\System32"; echo $path . "\n"; $tab = "Name\tAge"; echo $tab . "\n"; ?>
$str = "Hello\tWorld\n"; echo $str;
echo "Path to file: C:\newfolder\file.txt";
She said, "Hello\World!" including the quotes and backslash. Which code snippet achieves this?Pass the test and this pattern moves unknown