Skip to content

Commit 5fbb0a0

Browse files
some code in the textarea
1 parent e54dc3f commit 5fbb0a0

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

ch1.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@
1616
echo '<h3 id="syntax">Syntax</h3>';
1717
echo 'Nothing to fiddle with in this paragraph...';
1818
echo '<textarea id="Ch1p1ex1">
19-
<?php
20-
$a = array(\'a\' => 1, \'b\' => 2, 3 => \'c\');
21-
22-
echo "$a[a] ${a[3] /* } comment */} {$a[b]} \$a[a]";
23-
24-
function hello($who) {
25-
return "Hello $who!";
26-
}
27-
?>
28-
<p>The program says <?= hello("World") ?>.</p>
29-
<script>
30-
alert("And here is some JS code"); // also colored
31-
</script>
19+
showcode(<<<\'CODE\'
20+
$a = 10 + 010; echo $a . "\n";
21+
$a = 0.10 + 0x10; echo $a . "\n";
22+
$a = 10 + 0b10; echo $a . "\n";
23+
$a = 2E3 + 0b10; echo $a . "\n";
24+
$a = 1.2E2 + 0b10; echo $a . "\n";
25+
$a = 10 + 0b10; echo $a . "\n";
26+
27+
CODE
28+
);
3229
</textarea>einde textarea</br>';
3330

3431

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ $(document).ready (function() {
1212

1313
mytextarea = document.getElementById('Ch1p1ex1');
1414
var myCodeMirror1 = CodeMirror.fromTextArea(mytextarea,{
15-
lineNumbers: true,
16-
ru
15+
lineNumbers: true
1716
});
1817
//var myCodeMirror2 = CodeMirror(document.body, {
1918
// value: "function myScript2(){return 100;}\n",

0 commit comments

Comments
 (0)