質問編集履歴

6

2017/02/09 05:54

投稿

amaguri
amaguri

スコア227

test CHANGED
File without changes
test CHANGED
@@ -78,7 +78,7 @@
78
78
 
79
79
 
80
80
 
81
- $wret=fwrite($fp,"{id}"."{result}"."\n);
81
+ $wret=fwrite($fp,"{$id}"."{$result}"."\n);
82
82
 
83
83
  }
84
84
 

5

2017/02/09 05:54

投稿

amaguri
amaguri

スコア227

test CHANGED
File without changes
test CHANGED
@@ -42,6 +42,8 @@
42
42
 
43
43
 
44
44
 
45
+ $fp= fopen(ファイル名."a");
46
+
45
47
 
46
48
 
47
49
  foreach($arraydata as $data){
@@ -73,6 +75,10 @@
73
75
  }
74
76
 
75
77
 
78
+
79
+
80
+
81
+ $wret=fwrite($fp,"{id}"."{result}"."\n);
76
82
 
77
83
  }
78
84
 
@@ -130,6 +136,10 @@
130
136
 
131
137
  }
132
138
 
139
+
140
+
141
+
142
+
133
143
  ```
134
144
 
135
145
  今回の場合はbreakで処理を終了させforeachの処理に戻してあげれいいのでしょうか?

4

2017/02/09 05:35

投稿

amaguri
amaguri

スコア227

test CHANGED
File without changes
test CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
  }
32
32
 
33
- [3]=>array{
33
+ [3]=>array(2){
34
34
 
35
35
  ['id']00
36
36
 

3

2017/02/09 05:28

投稿

amaguri
amaguri

スコア227

test CHANGED
File without changes
test CHANGED
@@ -4,13 +4,39 @@
4
4
 
5
5
  $arraydata=
6
6
 
7
- [0]array['id']01['no']0100
7
+ array(4){
8
8
 
9
- [1]array['id']02['no']0200
9
+ [0]=>array(2){
10
10
 
11
- [2]array['id']03['no']0300
11
+ ['id']01
12
12
 
13
+ ['no']0100
14
+
15
+ }
16
+
17
+ [1]=>array(2){
18
+
19
+ ['id']02
20
+
21
+ ['no']0200
22
+
23
+ }
24
+
25
+ [2]=>array(2){
26
+
27
+ ['id']03
28
+
29
+ ['no']0300
30
+
31
+ }
32
+
33
+ [3]=>array{
34
+
35
+ ['id']00
36
+
13
- [3]array['id']00['no']0000
37
+ ['no']0000
38
+
39
+ }
14
40
 
15
41
  というデータがあり
16
42
 

2

2017/02/09 05:25

投稿

amaguri
amaguri

スコア227

test CHANGED
File without changes
test CHANGED
@@ -112,7 +112,7 @@
112
112
 
113
113
  それとも
114
114
 
115
- $id処理される前に
115
+ $id処理が実行される前に
116
116
 
117
117
  先に$data['no']が先頭が00になる場合にスキップするコードを記載して
118
118
 

1

2017/02/09 05:02

投稿

amaguri
amaguri

スコア227

test CHANGED
File without changes
test CHANGED
@@ -54,7 +54,7 @@
54
54
 
55
55
  という処理に
56
56
 
57
- 00の場合はスキップして
57
+ $data['no']が00の場合はスキップして
58
58
 
59
59
  $idを空にして
60
60