Skip to content

Commit 0d56677

Browse files
committed
fix sample js
1 parent e889d2d commit 0d56677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Suppose you need to pass a callback to a JSON object.
2525
?>
2626

2727
<scrtip>
28-
let bar = <?php echo $json_encode($array); ?>
28+
let bar = <?php echo json_encode($array); ?>;
2929
bar.callback('hello'); //error
3030
</script>
3131
```
@@ -53,7 +53,7 @@ To get around this problem, use `Raw` objects provided by this package:
5353
?>
5454

5555
<scrtip>
56-
let bar = <?php echo Encoder::encode($array); ?>
56+
let bar = <?php echo Encoder::encode($array); ?>;
5757
bar.callback('hello'); //prints hello
5858
</script>
5959
```

0 commit comments

Comments
 (0)