回答編集履歴
1
編集
answer
CHANGED
|
@@ -7,32 +7,12 @@
|
|
|
7
7
|
tdタグのタグを含めないテキストデータだけを取り出しできました。
|
|
8
8
|
```lang-<PHP>
|
|
9
9
|
$move = array(
|
|
10
|
-
"moveName" => (string)$value[0]->plaintext,
|
|
11
|
-
"No." => (string)$value[1]->plaintext,
|
|
12
|
-
"
|
|
10
|
+
"sample" => (string)$value[0]->plaintextt,
|
|
13
|
-
"category" => (string)$value[3]->plaintext,
|
|
14
|
-
"power" => (string)$value[4]->plaintext,
|
|
15
|
-
"accuracy" => (string)$value[5]->plaintext,
|
|
16
|
-
|
|
11
|
+
〜
|
|
17
|
-
"target" => (string)$value[7]->plaintext,
|
|
18
|
-
"priority" => (string)$value[8]->plaintext,
|
|
19
|
-
"direct" => (string)$value[9]->plaintext,
|
|
20
|
-
"protect" => (string)$value[10]->plaintext,
|
|
21
|
-
"magicCoat" => (string)$value[11]->plaintext,
|
|
22
|
-
"parroting" => (string)$value[12]->plaintext,
|
|
23
|
-
"
|
|
12
|
+
"sample18" => (string)$value[18]->plaintext
|
|
24
|
-
"vital" => (string)$value[14]->plaintext,
|
|
25
|
-
"despondency" => (string)$value[15]->plaintext,
|
|
26
|
-
"additionEffect" => (string)$value[16]->plaintext,
|
|
27
|
-
"additionProbability" => (string)$value[17]->plaintext,
|
|
28
|
-
"infomation" => (string)$value[18]->plaintext
|
|
29
13
|
);
|
|
30
14
|
```
|
|
31
15
|
|
|
32
|
-
```lang-<PHP>
|
|
33
|
-
//実行結果
|
|
34
|
-
[{"moveName":" \t\t\t\t\u306f\u305f\u304f","No.":" \t\t\t\tNo.1","type":"\u30ce\u30fc\u30de\u30eb ","category":"\u3076\u3064\u308a ","power":"40","accuracy":"100","PP":"35","target":"\u9078\u629e","priority":"0","direct":"\u25cb ","protect":"\u25cb","magicCoat":"\u00d7","parroting":"\u25cb","steal":"\u00d7","vital":"-","despondency":"-","additionEffect":"-","additionProbability":"-","infomation":"\u901a\u5e38\u653b\u6483"}]
|
|
35
|
-
```
|
|
36
16
|
他の参照では
|
|
37
17
|
innertext : タグ情報を含めたデータを抽出
|
|
38
18
|
outertext : まるごと抽出
|