HTML 文件: http ://www.arifoorum.com/test/html.htm
我用 simplehtmldom 库得到了这个 html 内容:
array(66) {
[0]=>
array(14) {
[0]=>
string(4) "Item"
[1]=>
string(11) "Date, time:"
[2]=>
string(8) "mõõdikud"
[3]=>
string(6) "Name 2"
[4]=>
string(6) "Name 3"
[5]=>
string(9) "Meter ID:"
[6]=>
string(6) "V_HeEn"
[7]=>
string(6) "U_HeEn"
[8]=>
string(3) "V_V"
[9]=>
string(3) "U_V"
[10]=>
string(6) "V_InTe"
[11]=>
string(6) "U_InTe"
[12]=>
string(6) "V_OuTe"
[13]=>
string(6) "U_OuTe"
}
[1]=>
array(14) {
[0]=>
string(1) "1"
[1]=>
string(19) "24.01.2013 22:23:33"
[2]=>
string(9) "Meter 002"
[3]=>
string(6) " "
[4]=>
string(6) " "
[5]=>
string(8) "40380040"
[6]=>
string(6) " "
[7]=>
string(6) " "
[8]=>
string(6) " "
[9]=>
string(6) " "
[10]=>
string(6) " "
[11]=>
string(6) " "
[12]=>
string(6) " "
[13]=>
string(6) " "
}
[2]=>
...
}
}
完整输出:http ://www.arifoorum.com/test/test.php
如何从该数组中获取某些元素?
例如:假设我想要值 where mõõdikud = 01
and name 2 = külm
(that should be 72,114) 。
谢谢