Leaving JS URL to end with Array() in PHP

Run Settings
LanguagePHP
Language Version
Run Command
<?php $root = 'https://domain.com/'; $scriptURLs = array(); /* add script url */ $scriptURL = <<<JS <script src="bootstrap/js/bootstrap.min.js"></script> JS; array_push($scriptURLs, $scriptURL); /* add script url */ $scriptURL = '<script src="'. $root .'bootstrap/js/bootstrap.min.js"></script>'; array_push($scriptURLs, $scriptURL); /* function */ function scriptURLs($tab = 0) { $t = ''; if ($tab != 0) { do { $t .= "\t"; $tab--; } while ($tab > 0); } global $scriptURLs; if (isset($scriptURLs[0])) { foreach ($scriptURLs as $scriptURL) { echo "\n".$t.$scriptURL; } echo "\n"; } } /* using */ scriptURLs(); // or scriptURLs(1); // with tab
Editor Settings
Theme
Key bindings
Full width
Lines