我正在拨打 OCRWebservice.com 并收到这样的回复
object(stdClass)#5 (1) {
["OCRWSResponse"]=>
object(stdClass)#6 (2) {
["ocrText"]=>
object(stdClass)#7 (1) {
["ArrayOfString"]=>
object(stdClass)#8 (1) {
["string"]=>
string(109) "......,......,- PHYSICIANS HAVE BIGGER STAKE IN PATIENT, TOTAL CARE UNDER MEDICARE ACOs AROUNDTHEINDUSTRY "
}
}
["ocrWSWords"]=>
object(stdClass)#9 (0) {
}
}
}
object(stdClass)#10 (1) {
["OCRWSResponse"]=>
object(stdClass)#11 (2) {
["ocrText"]=>
object(stdClass)#12 (1) {
["ArrayOfString"]=>
object(stdClass)#13 (1) {
["string"]=>
string(21) "AROUNDTHEINDUSTRY 10 "
}
}
["ocrWSWords"]=>
object(stdClass)#14 (0) {
}
}
}
我无法将其解析为 $response->OCRWSResponse->ocrText。我需要读取 ocrText 中的字符串值。
似乎返回了不止一个 OCRWSResponse。我需要遍历它们并获取所有 ocrText。有人可以帮忙吗?