将Innertext脱离XML Feed后不适用于我。我在想这样的事情可能有效:

foreach($html->find('td',1) as $e) {
echo '<div style="width:100%; word-wrap:break-word;">' . $e->innertext . '</div>';
} 
.

但它没有包装。我正在使用Chrome查看结果。我也试图使宽度变小,无济于事。它最终切断了文字并在最后给了我一个......我错过了什么?

有帮助吗?

解决方案 2

This is something you need to change in the jquery mobile css: .ui-li-desc { white-space: normal; }

其他提示

I used below snippet and works fine, $html->find('td',1) this snippet does not return an array it returns object at index 1. Correct way; If you want deal with all "td" tags you should remove second parameter

$e = $html->find('td',1);
echo '<div style="width:100%; word-wrap:break-word;">' . $e->innertext . '</div>';

http://simplehtmldom.sourceforge.net/manual_api.htm

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top