Created
October 17, 2018 07:46
-
-
Save reinislejnieks/c74dd5cf2e7d5d1cc85939c4610bc2e1 to your computer and use it in GitHub Desktop.
Write #js #sql using heredoc in #php code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$js = <<<JS | |
console.log('Hei!'); | |
let foo = 'bar'; | |
JS; | |
$sql = <<<SQL | |
USE somedb; | |
SELECT `foo`.* | |
FROM `foo` | |
WHERE `foo`.`bar` = 'baz' | |
SQL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment