質問するログイン新規登録

質問編集履歴

1

コード転記の際に入った全角スペースを除去

2019/06/19 13:26

投稿

Take_it
Take_it

スコア357

title CHANGED
File without changes
body CHANGED
@@ -1,16 +1,18 @@
1
1
  ```php
2
-  $config['calendar_warning'] = '+60 day';
2
+ $config['calendar_warning'] = '+60 day';
3
-
4
-  $now = new DateTime();
3
+ $now = new DateTime();
5
-  $check_ob = $now->modify($config['calendar_warning']); 
4
+ $check_ob = $now->modify($config['calendar_warning']);
6
5
  ```
7
6
 
8
7
  上記のように、別の場所であらかじめ変数に格納しておいた文字列をmodifyに適用できたらと思うのですが、これでは機能しません。
9
8
 
10
9
  ```php
11
-  $now = new DateTime();
10
+ $now = new DateTime();
12
-  $check_ob = $now->modify('+60 day'); 
11
+ $check_ob = $now->modify('+60 day');
13
12
  ```
14
13
  とすれば意図した結果が得られるのですが・・・。
15
14
 
16
- この場合どうすればよいのでしょうか?
15
+ この場合どうすればよいのでしょうか?
16
+
17
+ ※こちらに転記する際に全角スペースが入ってしまったので除去しました。
18
+ ※全角スペースのせいでないことは確認済みです。