Print string: Difference between revisions
Jump to navigation
Jump to search
m (link to Random content generator) |
m (→References) |
||
| Line 29: | Line 29: | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:String manipulation]] | |||
Revision as of 17:41, 9 May 2022
Print the string spanning multiple lines
PHP
Using the Heredoc syntax[1] to print the string spanning multiple lines
<?php echo <<<'EOD' The quick brown fox jumps over the lazy dog using nowdoc syntax. Backslashes are always treated literally, e.g. \\ and \'. EOD;
Python
Using triple quotes[2] to print the string spanning multiple lines
print("""The quick brown fox
jumps over the lazy dog""")