質問編集履歴
1
前回の課題を書いてなかったので追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,6 +46,16 @@
|
|
46
46
|
|
47
47
|
```php
|
48
48
|
|
49
|
+
//前回の課題
|
50
|
+
|
51
|
+
$html = '1<script>2</script>3<script>4</script>5';
|
52
|
+
|
53
|
+
$txt = preg_replace('<script.*<\/script>','',$html);
|
54
|
+
|
55
|
+
var_dump($txt); //15 と表示されてしまう。
|
56
|
+
|
57
|
+
|
58
|
+
|
49
59
|
//前回の解決例
|
50
60
|
|
51
61
|
$html = '1<script>2</script>3<script>4</script>5';
|